Is it possible to select a row after page reload?
I try to get this effect: http://jsfiddle.net/yg4n6/2/ I mean that the user can get the row highlight when he clicks. But the problem comes when I have to reload the page to do other things with php. The row selected is the same of the id.
<tr>
<td> <a href="?id=<?php echo $row['id'] ?>">
<input type="text" name="num" value="<?php echo $row['id']?>"/>
</a> </td>
<td><input type="text" name="a" value="<?php echo $row['a']?>"/></td>
<td><input type="text" name="b" value="<?php echo $row['b']?>"/></td>
</tr>
Each page reload is a new instance of the page from the server. So In case you want to save a state of your webpage, you will have to save it in some form like hidden fields or querystring. You cannot else do that with javascript.
What you do with javascript is on client side and server is not aware of that in anyway.
For your case you can do this. Assuming your rows are echo’d by php you can use this solution.
$row['id']being the id of the row in the resultset iteration.Hope it helps…