39
rated 0 times
[
45]
[
6]
/ answers: 1 / hits: 15507
/ 11 Years ago, tue, february 26, 2013, 12:00:00
Below is how I made an alert showing the dynamic id using onblur. I have a while loop with input fields so the id is pulling from a unique id in a database.
How would I get the value too? Normally I would just set a variable like usual but it's in a loop so I'm not understanding how.
<script type=text/javascript>
function doUpdateEntries(clicked_id) {
alert(clicked_id);
// how do I get the value AND id?
}
</script>
while ($row = mysql_fetch_assoc($result)) {
<input onblur=doUpdateEntries(this.id); id=.$row['entry_id']. name=.$row['entry_id']. type=text value=.$row['reviews'].>
}
More From » loops