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

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

 



On Tue, 2007-08-07 at 15:50 -0400, tg-php@xxxxxxxxxxxxxxxxxxxxxx wrote:
> 
> 3. If you're executing JS in order to output something, you're going
> to need to put it whereever in your HTML you'll need the output.  If
> you're just defining functions to be called later, then you can put
> it whereever (probably above where you're calling the functions.. see
> #1).

That's not true. You can still have it in the head and use javascript to
target specific content to a tag with an ID.

In fact, I'd say that's a better option when used in conjunction with
onload() since you can be certain all of your libraries are loaded.
Additionally it allows you to place default content in the event that
your visitor doesn't have JavaScript enabled.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

-- 
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