req.onreadystatechange = function () { if (req.readyState == 4) { if (req.status == 200) { parseMessageReply(req.responseText); } } }