Re: javascript in <head> or in <body> ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux