I’m creating a Joomla module which loads some data from a slow source, so I used Ajax to load data after page completely load.
I used Joomla 1.7 native mootools library and as far as I know, there are two events, “domready” that works after page structure load and “load” that works after page elements loads but none of them are working in IE7-.
Info: I’m testing with IETester and IE9 compatibility mode.
My Code:
window.addEvent('load', function() {
alert('page loaded!');
var url = '<?php echo $url; ?>';
var query = 'city1=<?php echo $city1; ?>&city2=<?php echo $city2; ?>&city3=<?php echo $city3; ?>&t=<?php echo $time; ?>';
updateElement('weather', url, query);
});
and alert is not working in IE at all
The solution was really stupid.
I added language=”javascript” attribute in script tag and it worked!
it should be like this to work:
not this:
or this:
Stupid IE!