[Javascript] action="insert"

Shawn Milo Shawn at Milochik.com
Fri Feb 10 07:58:51 CST 2006


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.

With JavaScript for validation, you simply refuse to allow the page to
submit when something is wrong. The user loses nothing if there is a problem
repopulating a field, and there is no delay as the page reloads or
refreshes. Plus, you don't need to have extra server-side code which
re-creates the entire input page *or* moves on to the next step, depending
upon the validity of the data.

At least, that's my humble opinion from my several years' experience in
developing in-house intranet applications professionally. Perhaps there are
other environments or application types where others have found the opposite
to be true. I'd be interested in hearing about them if so.

Shawn Milo


On 2/10/06, Flavio Gomes <flavio at economisa.com.br> wrote:
>
>
> David Dorward escreveu:
>
> >I'd hope that developers wouldn't add an unnecessary dependency on
> >JavaScript while creating more work for themselves out of
> >"preference".
> >
> >
>   This is something I'm working into too. JavaScript is great for
> "/front-data-evalutating/" and many other employments, but I try to keep
> all the basic and necessary functions for my sites in standard html,
> doing "/real-evaluating/" in server-side scripting.
>
> --
> Flavio Gomes
> flavio at economisa.com.br
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060210/ab65c989/attachment.htm>


More information about the Javascript mailing list