[jQuery] Clearing all form field values

[jQuery] Clearing all form field values

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=203391719-28122006><FONT face=Arial color=#0000ff size=2>This
is for a CMS so I'm not really that concerned with it validating (as long as it
works).</FONT></SPAN></DIV>
<P><FONT size=2><!----------------//------<BR>andy matthews<BR>web
developer<BR>certified advanced coldfusion programmer<BR>ICGLink,
Inc.<BR>andy@icglink.com<BR>615.370.1530
x737<BR>--------------//---------></FONT> </P>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Yehuda
Katz<BR><B>Sent:</B> Thursday, December 28, 2006 1:02 PM<BR><B>To:</B> jQuery
Discussion.<BR><B>Subject:</B> Re: [jQuery] Clearing all form field
values<BR><BR></FONT></DIV>You could try putting a form within a form. I'm not
sure how valid it is, but it definitely solves certain problems.<BR><BR>--
Yehuda<BR><BR>
<DIV><SPAN class=gmail_quote>On 12/28/06, <B class=gmail_sendername>Andy
Matthews </B><<A href="mailto:andy@icglink.com">andy@icglink.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2>The problem for me (in this
case) is that the few fields that need to be transmitted via AJAX (and then
reset) are part of a larger form that I do NOT want to get
reset.</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2>I might just have to do
each field manually.</FONT></SPAN></DIV><SPAN class=q>
<P><FONT size=2><!----------------//------<BR>andy matthews<BR>web
developer<BR>certified advanced coldfusion programmer<BR>ICGLink, Inc.<BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:andy@icglink.com"
target=_blank>andy@icglink.com</A><BR>615.370.1530
x737<BR>--------------//---------></FONT> </P></SPAN>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr align=left><FONT face=Tahoma size=2><SPAN
class=q>-----Original Message-----<BR><B>From:</B> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss-bounces@jquery.com"
target=_blank>discuss-bounces@jquery.com</A> [mailto:<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss-bounces@jquery.com"
target=_blank>discuss-bounces@jquery.com</A>]<B>On Behalf Of </B>Dave
Methvin<BR></SPAN><SPAN class=q><B>Sent:</B> Thursday, December 28, 2006
11:56 AM<BR><B>To:</B> 'jQuery Discussion.'<BR><B>Subject:</B> Re:
[jQuery] Clearing all form field values<BR><BR></SPAN></FONT></DIV>
<DIV><SPAN class=e id=q_10fca44e913a87a1_6>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>>
<FONT face="Times New Roman" color=#000000 size=3>$("form
:input:not([@type]):not(button)").val("")</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Times New Roman" color=#000000
size=3><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>That
will clobber the values on radio buttons and checkboxes. Here's another
vote for
form.reset().</SPAN></FONT></DIV></SPAN></DIV></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>jQuery
mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss@jquery.com">discuss@jquery.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://jquery.com/discuss/"
target=_blank>http://jquery.com/discuss/</A><BR><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>Yehuda Katz<BR>Web Developer | Wycats
Designs<BR>(ph)  718.877.1325 </BLOCKQUOTE></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/








































































    • Topic Participants

    • andy