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! Link to comment https://forums.phpfreaks.com/topic/177598-help-how-to-make-dblclick-text-able/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.