Re: Call to external function
| From: | Curt Zirzow | Date: | Fri, 23 Apr 2004 16:47:31 +0000 |
| Subject: | Re: Call to external function | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184430@lists.php.net to get a copy of this message | ||
* Thus wrote Torsten Roehr (roehr@zilleon.com):
>
> I have the script start when the page loads with an
> onload=function('go') in the <body> tag.
>
> But I need someway to turn it off... A simple:
>
> Echo "<script>function('stop')</script>"; at the end of the
> page
OnLoad is probably occuring after your you're 'stop' call. Onload
generally will be called when the document gets fully loaded.
Instead put the 'go' call in the <head> of your document.
<head>
<script ...>
function('go');
</script>
...
<script ...>
function('stop')
</script>
</body>
</html>
Curt
--
"I used to think I was indecisive, but now I'm not so sure."