Enable/Disable Text Boxes

Hi JS Gurus,

I’m really stucked with below logic. Please help.
I need to enable(disabled=“false”) the text box mode when user click on edit button. this is my code;


while ($rw = mysql_fetch_array($query1)) {
$k = $rw['Record_id'];
echo '<tr>';
echo'<form name = "t_data">';
echo '<td>'.'<input type="text" name="Record_id" value="'.$rw['Record_id'].'" disabled="true" size = "5"/>'.'</td>';
echo '<td>'.'<input type="text" name="file_number" value="'.$rw['file_number'].'" disabled="true" size = "9"/>'.'</td>';
echo'</form>';

echo' <td>';
echo'<form action="edit_grid.php" method = "GET">';
echo'<input type="submit" id="'.$k.'" value="Edit" onclick = "m()">';
echo'<input type="hidden" name="hf" value="'.$k.'">';
echo'</td>';


How do I achieve this…Please help…

function m() {
t_data.file_number.disabled="false";
return false;
}

Presumably you have some code elsewhere that will copy the content from the t_data form and send it back to the server since that form currently has no way to be submitted from the code you have shown.