Login

Grabbing a subsection of input field values

I was looking for a jQuery way of grabbing the values of a subsection of input fields. I know it is more complicated then just getting the $().val() of items because of selection elements. I found the plugin called Values but it was a bit more than I needed. I only need to get values not to set them. Plus I don’t want to get values from elements other than inputs, so there is no need to have the function grab text when it cannot find values. So for now I will use this plugin but I want to modify it in the future to serve this narrow purpose. (I like small clean simple code and not bloat).

–some time later–
Lol. It appears that sometimes the solution is right there and I over think the problem. I can do what I wanted to do with this simple line:

$('container class').find('input, select').serialize()

Well problem solved, on to the next one :) .

Related posts:

  1. A problem with jQuery’s .serialize() and the answer
This entry was posted in jQuery. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">