I have a page and use window.addEvent(‘load’, function() { alert(‘test’); }), but the browser never displays the alert. There are no JavaScript errors on the page that prevent this from running.
What might be happening? Is it possible that the page already loaded so the ‘load’ even doesn’t fire?
You might want to try using the ‘domready’ event. Once the DOM is loaded in the window, the function would be executed.