GoDxNero Posted June 5, 2009 Share Posted June 5, 2009 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 More sharing options...
chibineku Posted June 5, 2009 Share Posted June 5, 2009 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 More sharing options...
jeffman Posted June 5, 2009 Share Posted June 5, 2009 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 More sharing options...
GoDxNero Posted June 6, 2009 Author Share Posted June 6, 2009 Ok it worked : ) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.