954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help: Only last loaded javascript runs

I am having a problem getting two javascript snippets to run on a single
html document. Whichever one is loaded last (further down in the html doc)
runs fine. I am not any kind of javascript expert and would appreciate any
help here.

Thanks

-------------------------------------------

The two examples of the html doc are here:

http://216.122.129.151/javascript-conflict1.html

http://216.122.129.151/javascript-conflict2.html

--------------------------------------------

Alternatively I reproduce the two snippets here.

***********************************

gruntled
Newbie Poster
2 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

Problem (fairly simple/obvious) was having two "onload" commands - only one allowed - solved by combining the two triggers invoked by window.onload
into a single function

window.onload=fillup
window.onload=start_ticking

becommes

window.onload = function()
{
fillup();
start_ticking();
}

gruntled
Newbie Poster
2 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You