-
problem with onload function
Hi, Im an inexperienced user of java, and i need help with the following.
In my website I have a banner that loads when the page is opened, it uses the onload= function but I also have a piece of script for a live clock which also uses this function. the problem is that only one piece of script will load, usually the clock because this script comes before the banner's script. I know that this is the problem from trial and error, though I want to know if there is a way in which I can use both pieces of script?
can anyone help me?
-
-
Note: Questions regarding multiple script usage are not usually replied to due to their time consuming nature. See this thread for more information, and this tutorial for one possible solution.
Aside from the tutorial above, which usually is the solution when the problem is two different scripts, you may need to consult:
http://www.howtocreate.co.uk/tutoria...allshow#refcon
Which explains how two scripts on the same page may not use the same set of variable names, id names, etc. This is especially important if the problem is two copies of the same script on a page but, can come into play with two different scripts when the first step won't fix it.
One other approach that works in both situations, if adaptable to one (or more) of the scripts, is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks