944,068 Members | Top Members by Rank

Ad:
Nov 9th, 2005
0

onLoad commands

Expand Post »
Hi This is your friendly idiot reporting in with a big question. :o I have been asked to help make a web page for some little kids with an advent calendar (No problem there) snow falling, and a countdown script including days, hours, minutes and seconds. My problem is that I can't figure out how to write two onLoad commands that work. One boy said that he knew how but it didn't work when he tried it. It does seem to me that I read someplace long before I even knew what an onLoad command was that there was a way to do it by delaying the second one for a couple of seconds but I can't find that site again and I have been googling for two weeks now with no luck. Can someone please help me with this?

Everyone seems to think that I am the only one who can do this even when I say that I don't know how. But when they look at me with those big eyes little kids seem to have, I have to at least try. Thanks for reading this and a bigger thanks if you can help me with the code.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
Bomba is offline Offline
32 posts
since Oct 2005
Nov 10th, 2005
0

Re: onLoad commands

Is this impossible or did I not make the question plain enough? I have 2nd graders looking at me.
Reputation Points: 10
Solved Threads: 1
Light Poster
Bomba is offline Offline
32 posts
since Oct 2005
Nov 10th, 2005
0

Re: onLoad commands

If you have two functions which need to run, everytime, when the page loads, then you simply wrap them both in a third "container" function.

HTML and CSS Syntax (Toggle Plain Text)
  1. myFunction_01()
  2. {
  3.  
  4. }
  5.  
  6. myFunction_02()
  7. {
  8.  
  9. }
  10.  
  11. myLoadFunction()
  12. {
  13. myFunction_01();
  14. myFunction_02();
  15. }

Then you write the body tag: <body onload="myLoadFunction();">

You have to be patient - sometimes it can take a day or two before anyone can respond to a post - we're all volunteers with day jobs, school, etc.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Nov 10th, 2005
0

Re: onLoad commands

Quote originally posted by Bomba ...
Is this impossible or did I not make the question plain enough? I have 2nd graders looking at me.
Hi,

Anyways, its not possible to have two onload() methods in a single page.But u can solve this problem by using Timer.

Hi Tigreer, I thought the same.

Thanks,
Kedar
Reputation Points: 10
Solved Threads: 1
Light Poster
kedar_challa is offline Offline
47 posts
since Nov 2005
Nov 10th, 2005
0

Re: onLoad commands

ok the second graders have gone back home and I am calling a moving van because I am entirely too stupid to understand this. Thank you anyway from the idiot of the century. Bye. I won't bother you anymore. I am leaving town to get away from these kids.
Reputation Points: 10
Solved Threads: 1
Light Poster
Bomba is offline Offline
32 posts
since Oct 2005
Nov 11th, 2005
0

Re: onLoad commands

I'm not sure how to take your post. Humor, I hope? If we've misunderstood the question, just rephrase it. We'll eventually get it right!
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Have a problem with centering "jpg" files
Next Thread in HTML and CSS Forum Timeline: Using Yahoo! Sitebuilder





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC