Re: javascript in <head> or in <body> ?
| From: | Richard Lynch | Date: | Tue, 07 Aug 2007 23:42:49 +0000 |
| Subject: | Re: javascript in <head> or in <body> ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260355@lists.php.net to get a copy of this message | ||
On Tue, August 7, 2007 3:19 pm, C.R.Vegelin wrote:
> Are there any rules when to include javascript in <head> or in <body>
> ?
> For example,
> <script type="text/javascript">
> function reload(form)
> { var
> val=form.Chapter.options[form.Chapter.options.selectedIndex].value;
> self.location='QueryForm.php?Chapter=' + val ;
> }
> </script>
Yes.
But this is a general HTML/Javascript question, and not a PHP question.
The best short answer I can provide is this:
When in doubt, it belongs in <head>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?