On Wednesday, March 13, 2002, at 07:36  PM, Analysis & Solutions wrote:

> Sure it works... execpt when people who have Java'sCrap turned off come
> to your site.  Oh, and then there's the folks with browsers that don't
> have JS at all?  HTTP headers work across all browsers.
> header('Location: http://foo.org/') is the real solution.
> For more info on why not to use Java'sCrap and how accomplish the same
> things without it, see
>    http://www.analysisandsolutions.com/code/weberror.htm?j=y

I agree with what you say -- never rely on JavaScript.

A good rule of thumb (IMO) is to make sure that your site works 
perfectly and does exactly what it should using HTML/PHP code alone 
(test with JS turned off), and then add "features" with JavaScript that 
may make it -better-, but not features that are ever -required-.  For 
instance, make sure that your PHP validates the forms that are submitted 
to the server, but if you have already done this then you can add 
JavaScript form validation so that the user doesn't have to wait for a 
full resubmit to make sure that they have everything.

There are other ways that I can see JS enhancing a web site, as long as 
you don't require JS to do what you want... but in all honesty I haven't 
learned much JS so even I don't really take this route.  It's just a 



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

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

Reply via email to