The following code is supposed to perform an AJAX request after the page loads, and then display the response of that AJAX call in a popup. This works in Firefox, but I have no idea why it does not work in IE8.
<html>
<head>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript">
// Do this stuff when DOM finishes loading.
document.observe("dom:loaded", function() {
new Ajax.Request("page.html", {
onSuccess: function(response) {
alert(response.responseText);
}
});
});
</script>
</head>
<body>
</body>
</html>
page.html just contains
hello world
Am I missing something obvious or is this a result of the prototype js library not being fully compatible with IE8? I tried this with the latest stable prototype release (1.6.0.3) and the bleeding-edge version (1.6.1 RC3) with no luck. Any help would be much appreciated, thanks!