[Javascript] action="insert"

David Dorward david at dorward.me.uk
Fri Feb 10 08:17:30 CST 2006


On Fri, Feb 10, 2006 at 08:58:51AM -0500, Shawn Milo wrote:
>    For my ASP pages, I find that using JavaScript as much as possible to
>    validate the form before it is submitted saves me a *lot* of work. If
>    something is entered incorrectly and the problem is found after the page
>    is submitted, I then have to put all of the values from that page into
>    variables and insert server-side code into each HTML object to
>    conditionally set that content as the default value for the object.

The problem with depending on JavaScript for this is that if
JavaScript is turned off then the for msubmits without the checks
being performed.

A client side check can be fantastic for saving the user time (in that
they don't have to wait for a server round trip), but it doesn't
protect users without JavaScript from silly mistakes, or your database
(or email server, or whatever the ASP interacts with) from malicious
users.


-- 
David Dorward                                      http://dorward.me.uk




More information about the Javascript mailing list