View Full Version : onload problem
10-16-2006, 10:40 PM
Ive got this problem, Ive added this function which reloads a frameset on the form (onload part).
but this results in all other buttons not to work?? and i cannot navigate away from the page.???
if i take the onload function out all buttons work?? any ideas on how i can solve this plz?
Confusing.... Can you make it more precise, please? Which other buttons? What other buttons do? Navigate away from which page?
10-17-2006, 10:58 AM
I have a form which has three frames one of them is header, main and footer. The header only loads once thus i cant do anything to it like disable it based on a action on a page....so i found this code below that onload <body onload="top.frames.location.reload()"> this reloads the first frame the header which is correct and i can disable the toolbar based on certain action..but the other buttons are
Next to move away from the page, exit and Save jus dont work anymore...:S
10-18-2006, 05:49 PM
It seems that if I have both trying to load when the page loads, only the first one that actually loads runs while the other one does not. I'm not sure but it seems that you can't have more than one thing that loads on page load.
Anyone know a way around this?
if boths codes invoke the window.onload (or simply onload) event to start some functions, you must "unify" somehow the onload
and make sure that there is no other window.onload or <body onload="something()"> in your page
10-18-2006, 06:10 PM
Ive only got one onload function Kor....do u understand my problem??...ive put that code which reloads the toolbar in my body tag but when i click my Next or cancel buttons all it seems to do is reload the page again???
any ideas how i can solve this.
10-18-2006, 06:39 PM
What Kor is saying is... a lot of these copy & paste scripts that you download off the Internet do a lot of behind-the-scenes work. In Paithar's case, the script for his news ticker 'could' invoke code such as: window.onload = initTicker;
Now, it sounds like you might be using some form of menu system? If you coded the menu from scratch yourself then you're obviously familiar enough with the code to know if it runs any such window.onload = ... functions. But if you got it off the Internet, then all Kor is saying is that it's worth taking a closer look at the core of that code.
Scripts interfere with eachother a lot. Be it using the same variable names, or overwriting the same function calls. What you described has the classic symptoms of two scripts conflicting with one-another.
10-18-2006, 07:06 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.