Oops - yep - obviously this.value won't work on checkboxes, etc.

Good point - cheers!


malsup wrote:
> 
> On 3/6/07, Remy Sharp <[EMAIL PROTECTED]> wrote:
>>
>> A screencast for beginners to jQuery and/or AJAX showing how easy it is
>> to
>> add an AJAX layer to submit a form.
> 
> 
> Excellent job on that screencast, Remy!
> 
> Since you end the cast with a note about putting the script into a
> plugin I would just like to point out that gathering form data is a
> bit more complex when dealing with meatier forms.  Your code works
> fine for a form that contains only text fields, but it would not work
> for a form that contained a checkbox, radio button or multi-select
> element.  In addition, encodeURIComponent should be used instead of
> escape (and it should be used on both the name and value).
> 
> I realize your demo was about how easy it is to ajaxify a form, and
> you did an awesome job demonstrating that.  I just wanted to follow up
> with some additional info.
> 
> Cheers!
> 
> Mike
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Screencast%3A-how-to-easily-use-AJAX-to-submit-a-form-using-jQuery-tf3356310.html#a9338189
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to