2006/11/15, Paul McLanahan <[EMAIL PROTECTED]>:
I would definitely like to see val() work on any form element. I
frankly didn't know that it doesn't. It only makes sense that it
would since there would be no point in implementing the function if it
only replaces $('input')[0].value. I believe the true power of most of
jQuery is the fact that it abstracts some really complex code into a
really simple API. Having one function that will get the current value
from any form element (a String for most elements, or an array for
multiple selects) would be a real win, and it should be in the core.
The other argument I can see is the filesize one. Keeping the core
jQuery filesize down is a great goal for the project. So, if you guys
see an enhanced val() function as only required if one is working with
forms as far as Ajax is concerned, then perhaps it should be enhanced
as part of the ajax.js file in the core so that it can be easily
removed if no ajax stuff is needed for a project. Otherwise, the only
other place I see it being appropriate is as part of the Form plugin.
I would personally like to have it in the core. Getting and setting
info about DOM elements is the bread-and-butter of jQuery, so a more
powerful val() function would be a good use of bandwidth in my mind.
Paul
On 11/14/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> I often times just need to know the value of one form element and
> sometimes that could be a group of radio buttons, a select, a multiple
> select or just a regular input. The current $.val() method is limited
> only to inputs. I was curious if anyone else needed this funtionality
> and if it should be in a plugin or in the core?
>
> --
> Brandon Aaron
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
--
Paul Bakaus
Web Developer
------------------------
Hildastr. 35
79102 Freiburg
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/