Jump to content

How to use window.onload = CreateTimer?

- - - - -

  • Please log in to reply
2 replies to this topic

#1
CovertOps2011

CovertOps2011

    Newbie

  • Members
  • Pip
  • 2 posts
Ok, I guess I'm not doing it right as it isn't coming up. I am using NotePad++ as my editor as it is the best multi-platform editor to use. Where it shows this area"
<html>

<head>

<script type="text/javascript" src="/Timer.js" />

</head>


<body>

<div id='timer' />

<script type="text/javascript">window.onload = CreateTimer("timer", 30);</script>

</body>

</html>


Do you place the above portion "


<html>

<head>

<script type="text/javascript" src="/Timer.js" />

</head>


At the very top and then place this portion "

<body>

<div id='timer' />

<script type="text/javascript">window.onload = CreateTimer("timer", 30);</script>

</body>

</html>
At the very bottom?

I am needing a fast answerr as I am working on a project.

Edited by Roger, 15 November 2011 - 08:09 AM.
moved to new thread


#2
CovertOps2011

CovertOps2011

    Newbie

  • Members
  • Pip
  • 2 posts
Ok, I need some help, I posted earlier but I guess it didn't show up, I am having some problems getting the code to work.

#3
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
Would there be much difference if you move "CreateTimer("timer", 30)" to the body onload?
<body onload="CreateTimer('timer', 30)">
...
</body>
(note the single quotes around 'timer'.)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users