Jump to content

Quick Question


GoDxNero

Recommended Posts

I got 2 onload events ( javascripts ) how do I put it in the body ? I have tried : <body onload="startclock();checkCookie()">But its not working :'(then I tried <body onload="startclock() onload="checkCookie()"> then none work

Link to comment
Share on other sites

You can create a third function which calls the two functions you want to run, and put a reference to the third one in the onload slot.

Link to comment
Share on other sites

The best way is to take ALL javascript out of your tags and keep it in a script:

<script type="text/javascript">	window.onload = function () {		startclock();		checkCookie();	}</script>

Notice that this technique is infinitely expandable, too. Just add more statements.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...