> Can anyone suggest a suitable means for detecting if a client browser
> has JavaScript enabled or not?
>
> I know this isn't exactly PHP related, but I need to make sure my PHP
> script offers an alternative in a friendly way and not a JS error, but
> I just wondered if there was a foolproof method of doing this?

Er ... how do you generate a JS error with a JS disabled browser?

I don't think there is a 100% reliable way of detecting server side whether
a client browser has disabled javascript. However what you could do is to
use a <script></script> block to spit out javascript enabled code using
document.write() which will be ignored by disabled clients and then use
<noscript></noscript> tags to enclose whatever stuff is necessary for the
disabled clients?

Just a thought
Cheers
Rich

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

Reply via email to