I have the following HTML:
<form class="lala">
<input type="text" id="textv" value="Text 1" size="5">
<input type="submit" value="Go!"></form>
<form class="lala"><input type="text" id="textv" value="Text 2" size="5"><input type="submit" value="Go!"></form>
Now I have the following JQuery:
$(document).ready(function(){
$(".lala").submit(function() {
alert($("#textv").val());
});
Of course this is not working (I know I shouldn't use duplicate IDs) , but how can I show an alert of the text value where the corresponding submit button was clicked?
Thanks, Joel