malsup wrote:
>
> I've taken a stab at adding fieldValue and fieldSerialize to the form
> plugin. Please let me know if this impl makes sense. I also
> refactored ajaxSubmit so that it passes its options arg on to the
> $.ajax method (so any $.ajax options flow right through).
>
> I've got a test page up here: http://malsup.com/jquery/form/field.html
>
The value for the Hidden field is "hiddenValue" and not "secret". :)
In the case of the checkboxes, if you check two boxes and use [EMAIL PROTECTED]
fieldValue will only show the first value. That would need to go into the
array case like the select-multiple. But, if there is only one box checked
(or just one box with that name) should it return a simple value or an array
with one value? If it sometimes returns an array and sometimes not, that
would complicate using the return value.
Selectors that select multiple form elements will only return the first
value for fieldValue, but serialize all the values. That's a more general
case of the checkbox dilemma above. Methods like .attr and .css escaped from
that by only dealing with the first element in the jQuery object, but that
won't work here, at least for some form element types.
--
View this message in context:
http://www.nabble.com/%24.val%28%29-limited-in-functionality--tf2633751.html#a7371092
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/