[thelist] Validating Forms with Javascript Disabled

Warden, Matt mwarden at odyssey-design.com
Wed Aug 30 17:26:21 CDT 2000

Two ways:

Have the form handler program act as the displayer and the handler. So, this
program would first write the HTML for the form, and then validate it and
handle it once submitted. That way, you can just plug in the values that
were just validated... no redirection at all.

The second way is to create a HUGE query string passing all the variables.
What server-side language are you using? CGI? Kind of sounds like it since
you said "program".

The third, less-nifty way to do things is to write out:
    You info sucks, please make it better
    <a href="javascript:history.go(-1);">Back</a>
Most browsers will keep the fields populated. Others will not. Sometimes it
depends on the environment (secure connection?) and browser/client settings.


----- Original Message -----
From: <Gregory.John.Toland at census.gov>
To: <thelist at lists.evolt.org>
Cc: <Gregory.John.Toland at census.gov>
Sent: Wednesday, August 30, 2000 6:05 PM
Subject: [thelist] Validating Forms with Javascript Disabled

> What is the best method to validating form entries with Javascript
disabled?  I
> assume I  include the code (that would normally have executed on the
> side) in the program defined by the ACTION attribute.  If there is an
error in
> the entry (i.e. form field is blank) how do I redirect the user back to
the page
> containing the form, but without resetting all the fields to blank (i.e.
> fields with entries retain their values)?  Any advice or web sites with
> examples?  Thanks so much for any help you could give.
> Greg
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !

More information about the thelist mailing list