samoi Posted October 13, 2009 Share Posted October 13, 2009 Hello guys! Subject is not clear, but I will have it as clear as I can! First, I am totally new to the JS! I have some skills but not too much! here is a code: <? include('func.php'); ?> <html> <head> <script language="JavaScript" type="text/javascript"> function editfield(u){ var user = document.getElementById(user); } </script> </head> <body> <table border="1"> <tr> <td> username </td> </tr> <? while ($row = mysql_fetch_array($SQL)) { echo '<tr>'; echo '<td name="user" onDblcilck="editfield()">' . $row['username'] . '</td>'; echo '</tr>'; } // HOWEVER! I need to edit $row['username']. So, on double click i need it to change to <input type="text" /> field! // And then I need to get that variable of the edited username, and submitted it through a form to the db! ?> </table> </body> </html> I need when dblclick to convert the <td> to <input />! And I want to get the value of the edited user to submitted to the database! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.