User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 401,694 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,706 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 2173 | Replies: 5
Reply
Join Date: Oct 2005
Posts: 31
Reputation: Bomba is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
Bomba's Avatar
Bomba Bomba is offline Offline
Light Poster

Solution onLoad commands

  #1  
Nov 9th, 2005
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2005
Posts: 31
Reputation: Bomba is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
Bomba's Avatar
Bomba Bomba is offline Offline
Light Poster

Re: onLoad commands

  #2  
Nov 10th, 2005
Is this impossible or did I not make the question plain enough? I have 2nd graders looking at me.
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: onLoad commands

  #3  
Nov 10th, 2005
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.

myFunction_01()
{

}

myFunction_02()
{

}

myLoadFunction()
{
  myFunction_01();
  myFunction_02();
}

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.
Reply With Quote  
Join Date: Nov 2005
Location: Mountain View, CA
Posts: 47
Reputation: kedar_challa is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
kedar_challa's Avatar
kedar_challa kedar_challa is offline Offline
Light Poster

Re: onLoad commands

  #4  
Nov 10th, 2005
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
Thanks,

KedarNath Challa
Reply With Quote  
Join Date: Oct 2005
Posts: 31
Reputation: Bomba is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
Bomba's Avatar
Bomba Bomba is offline Offline
Light Poster

Re: onLoad commands

  #5  
Nov 10th, 2005
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.
The stupidest person in the history of the world. That's me.
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: onLoad commands

  #6  
Nov 10th, 2005
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!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 8:10 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC