i have many forms on one page. i’m using jquery and ajax to update the page. the function is on an image when clicked it passes variable from that form to the php script via ajax. it works for teh first form but not the rest. how do i tell the script to look at the inputs with in the form it in?
i’m try to use
$('#2').closest('form').attr('qty');
where #2 is form id and qty it gyy field
<form action='javascript:void(0)' method='post' id='2'>
<input id=\"qty\" name=\"qty\" type=\"text\" size=\"10\" id=\"qty\"/>
<input name=\"\" type=\"image\" value=\"".$rowTab[productID]."\" src=\"../images/add-to-pallet-button.png\" onclick=\"showUser2(this.value)\"/>
</form>
you can find parent form like this,
hope this help…….