mmosel Posted February 16, 2006 Share Posted February 16, 2006 Help!!Argh!Things are going along just fine, until I start getting this error in IE while using a window.onload = function();I get this error 'not implemented'. The strange thing is that the function still executes, but I get this error and I can't get rid of it. ????? Link to comment https://forums.phpfreaks.com/topic/3446-windowonload-problem-argh/ Share on other sites More sharing options...
ChrisDarl Posted February 16, 2006 Share Posted February 16, 2006 And you've set it out like the code bellow? window.onload = function() { [JavaScript Code to run on load] };Chris Link to comment https://forums.phpfreaks.com/topic/3446-windowonload-problem-argh/#findComment-11827 Share on other sites More sharing options...
mmosel Posted February 16, 2006 Author Share Posted February 16, 2006 [!--quoteo(post=346489:date=Feb 16 2006, 02:50 PM:name=ChrisDarl)--][div class=\'quotetop\']QUOTE(ChrisDarl @ Feb 16 2006, 02:50 PM) [snapback]346489[/snapback][/div][div class=\'quotemain\'][!--quotec--]And you've set it out like the code bellow? window.onload = function() { [JavaScript Code to run on load] };Chris[/quote]Well, I had been using this method, perhaps this was wrong?function load(){executeotherfunction();};window.onload = load();then, I found this and tried it:function loadmeup(){executeotherfunction();};var OnLoad = 'loadmeup()';window.onload = function() {eval(OnLoad);};and it seems to work in IE. I haven't had a problem with Firefox.I'll try it the other way and see what happens, thanks! Link to comment https://forums.phpfreaks.com/topic/3446-windowonload-problem-argh/#findComment-11837 Share on other sites More sharing options...
shoz Posted February 17, 2006 Share Posted February 17, 2006 [quote]Well, I had been using this method, perhaps this was wrong?function load(){executeotherfunction();};window.onload = load();[/quote]Remove the "()" after load.[code]window.onload = load;[/code] Link to comment https://forums.phpfreaks.com/topic/3446-windowonload-problem-argh/#findComment-11859 Share on other sites More sharing options...
ChrisDarl Posted February 17, 2006 Share Posted February 17, 2006 The code that i put works, you can put whatever code you like betwee n the { } be it running another function or not. Link to comment https://forums.phpfreaks.com/topic/3446-windowonload-problem-argh/#findComment-11880 Share on other sites More sharing options...
mmosel Posted February 17, 2006 Author Share Posted February 17, 2006 [!--quoteo(post=346875:date=Feb 17 2006, 04:02 PM:name=ChrisDarl)--][div class=\'quotetop\']QUOTE(ChrisDarl @ Feb 17 2006, 04:02 PM) [snapback]346875[/snapback][/div][div class=\'quotemain\'][!--quotec--]The code that i put works, you can put whatever code you like betwee n the { } be it running another function or not.[/quote]Thanks both of you. I'll try out both or your suggestions and see how it goes.Cheers. Link to comment https://forums.phpfreaks.com/topic/3446-windowonload-problem-argh/#findComment-11884 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.