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.
<br><br>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.
<br><br>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.
<br><br>Shawn Milo<br><br><br><div><span class="gmail_quote">On 2/10/06, <b class="gmail_sendername">Flavio Gomes</b> &lt;<a href="mailto:flavio@economisa.com.br">flavio@economisa.com.br</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;">
<br>David Dorward escreveu:<br><br>&gt;I'd hope that developers wouldn't add an unnecessary dependency on<br>&gt;JavaScript while creating more work for themselves out of<br>&gt;&quot;preference&quot;.<br>&gt;<br>&gt;<br>
&nbsp;&nbsp;This is something I'm working into too. JavaScript is great for<br>&quot;/front-data-evalutating/&quot; and many other employments, but I try to keep<br>all the basic and necessary functions for my sites in standard html,
<br>doing &quot;/real-evaluating/&quot; in server-side scripting.<br><br>--<br>Flavio Gomes<br><a href="mailto:flavio@economisa.com.br">flavio@economisa.com.br</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>