RE: [LINK] Ikea zangelding

From: Saliya Wimalaratne (saliya@hinet.net.au)
Date: Tue Mar 05 2002 - 13:48:53 EST


On Mon, 4 Mar 2002, Howard Lowndes wrote:

> I think JS has its place and one that comes to mind is in parsing forms
> input prior to a GET or POST. What is wrong with the browser being made
> to perform some attempt at ensuring reasonably clean input to CGI scripts
> instead of making the CGI do all the work.

cos your CGI is going to have to do it, anyway. Never ever trust
client data. Ever :P

The only benefit of the above is preventing the user from retyping in
pages of information if a data element is unintentionally left blank by
the user (but is required) or if the data is wrong (e.g. a typo). Using JS
to show a preliminary 'confirm' screen or do rudimentary data checking
(e.g. that all required elements have values) can save much time and
annoyance for the user if done properly.

JS should *not* be required for correct form operation, though (and you
can never use a client to validate its own data).

Regards,

Saliya



This archive was generated by hypermail 2.1.1 : Sun Mar 31 2002 - 03:10:04 EST