<br><br><div><span class="gmail_quote">On 2/10/06, <b class="gmail_sendername">David Dorward</b> &lt;<a href="mailto:david@dorward.me.uk">david@dorward.me.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Feb 10, 2006 at 08:58:51AM -0500, Shawn Milo wrote:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;For my ASP pages, I find that using JavaScript as much as possible to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;validate the form before it is submitted saves me a *lot* of work. If
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;something is entered incorrectly and the problem is found after the page<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;is submitted, I then have to put all of the values from that page into<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;variables and insert server-side code into each HTML object to
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;conditionally set that content as the default value for the object.<br><br>The problem with depending on JavaScript for this is that if<br>JavaScript is turned off then the for msubmits without the checks<br>being performed.
<br><br>A client side check can be fantastic for saving the user time (in that<br>they don't have to wait for a server round trip), but it doesn't<br>protect users without JavaScript from silly mistakes, or your database<br>
(or email server, or whatever the ASP interacts with) from malicious<br>users.<br><br><br>--<br>David Dorward&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://dorward.me.uk">http://dorward.me.uk</a><br><br>_______________________________________________
<br>Javascript mailing list<br><a href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</a><br><a href="https://lists.LaTech.edu/mailman/listinfo/javascript">https://lists.LaTech.edu/mailman/listinfo/javascript</a><br>
</blockquote></div><br><br>Good point. I should mention that the users of my intranet applications are all using a standard PC image, and I know what browser they are using and that they have JavaScript enabled. For an application available on the Internet, I can see the value of the other method.
<br><br>However, do you have a more elegant solution to repopulating the form than the method I mentioned in my earlier e-mail? It would sure be nice to have something cleaner. Trust me -- I did it that way for a long time because I was following others' code. But when I started creating my own new applications, I found JavaScript validation to be so much nicer, and so much less work -- especially when adding new fields to a form. New fields only require a cut &amp; paste of a couple of JavaScript lines, while fixing server-side validation requires changes in several places.
<br><br>Shawn<br>