Hi guys,
I can't seem to get the following functionality to work under Chrome and Opera (latest versions on Windows XP). The code is:
$.getScript('/js/modules/'+module+'.js', function() {
setTimeout('window.'+module+'_init()', 800);
});
Everything seems to work fine, the script loads, init function exists (a few debug alerts within that setTimeout statement verified that type of "window.module_init" really is a function) but the function just won't run.
I tried putting a simple alert at the beginning of that init function, leave ONLY an alert there - nothing helped.
I must say I'm quite puzzled by this, as this works just fine under Firefox and MSIE.
FYI, the init function in that external js file simply looks like this:
function notifications_init() {
alert('test');
}
"notifications" is the value of my "module" variable above
Any advice is greatly appreciated :-)