javascript - jquery selectors getting unique id -
i'm trying row contents selecting tr element has unique id.
this have far, i'm new this, , unsure why isn't working.
var value = $('tr#'+idd).find('input[type=text]').map(function() { return $(this).attr("value"); }).get();
i've tried changing id it's not unique , receive data. confused why statement doesn't.
any appreciated
while ($record = mysql_fetch_array($entrys)) { echo "<tr id='" . $record['id'] . "'>"; echo "<td>" . "<input type='text' id='id' name='id' value=" . $record['id'] . " ></td>"; echo "<td>" . "<input type='text' id='make' name='make' value=" . $record['make'] . " ></td>"; echo "<td>" . "<input type='text' id='fuel' name='fuel' value=" . $record['fuel'] . " ></td>"; echo "<td>" . "<input type='text' id='transmission' name='transmission' value=" . $record['transmission'] . " ></td>"; echo "<td>" . "<input type='text' id='size' name='size' value=" . $record['size'] . " ></td>"; echo "<td>" . "<input type='text' id='doors' name='doors' value=" . $record['doors'] . " ></td>"; echo "<td>" . "<input type='hidden' id='hidden' name='hidden' value=" . $record['id'] . " ></td>"; echo "<td>" . "<button name='update' onclick=edit('".$record['id']."') >edit</button>"; echo "<td>" . "<button id='delete' name='delete' onclick=del('".$record[id]."') value=" . $row . " >delete</button> </td>"; echo "</tr>"; } echo "</table>";
try this:
return $(this).val();
Comments
Post a Comment