Brad Bansner
asked on
get values of text boxes, by class, within a DIV where I know ID of DIV
I have text boxes like this:
<input type="text" class="organization" size="32">
They are buried a few levels down beneath a DIV, such as:
<div id="abc">
</div>
In my script, I know the ID of the DIV. I need to get what is typed into the text box by class. There will be only one "organization" class within each DIV.
The text box is not a direct child of the DIV, which is where I'm getting a little confused.
Thank you!
<input type="text" class="organization" size="32">
They are buried a few levels down beneath a DIV, such as:
<div id="abc">
</div>
In my script, I know the ID of the DIV. I need to get what is typed into the text box by class. There will be only one "organization" class within each DIV.
The text box is not a direct child of the DIV, which is where I'm getting a little confused.
Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That worked, with the exception that I just needed to add val() to the end. Thanks!
http://stackoverflow.com/questions/4088467/jquery-get-value-in-input-text-box
http://api.jquery.com/val/
or try
Open in new window
hope it helps.