how to get value in text field
- by air
i have one text field and setting its name & values from php
like
<input type="text" id="qtyProductID_' . $productID . '" size="3" value="' . $totalItems . '" >
i also have image button for click event
<a href=fun.php?action=update&productID=' . $productID . ' onClick="return false;"><img src="images/update.jpg" id="updateProductID_' . $productID . '"></a>
now after click in JS file i want to get value of text field i click
var productIDValSplitter = (this.id).split("_");
var productIDVal = productIDValSplitter[1];
var tqty = $('#qtyProductID_'.productIDVal[1]).attr('value');
alert(tqty);
i am getting error
i am looking for how to set the variable name in
$('#qtyProductID_'.productIDVal[1])
Thanks