Snippet of JavaScript Code:
var httprequest = new XMLHttpRequest();
var time = new Date();
if (httprequest) {
httprequest.onreadystatechange = function () {
if (httprequest.readyState == 4) {
alert("OK");
}
};
httprequest.open("GET", "http://www.google.com", false);
httprequest.send(null);
}
alert(new Date() - time);
When tested on different browsers:
- IE8: Displays OK and time dialog.
- Chrome10: OK dialog shown, but time dialog is not prompted.
- Firefox3.6: OK message displayed without the time dialog.
Why are some dialogs not being prompted?