hello from france,
I want to edit a list of customers dynamically and
each row contains an input text with the name of customer and link to update the name the link calls the javascript function "enablerInput()" to change the input's property from disabled to enable.
--------------------------------------------------------------------------------
the HTML part is a table and i add rows with SQL query ... here is the code
$query = "SELECT * FROM $table";
$res = mysql_query($query);
// tant qu'il y a des fiches
while ($val = mysql_fetch_array($res))
{
$ident = $val["Id_client"]
?>
<tr>
<form name="tablo_client">
<td><input type="text" disabled id="<? $ident; ?>" value='<? echo $val["nom"]; ?>'></td> //function EnablerInput() has to change the property disabled
<td align="center"><a href="javascript:supprimer(); id='<? echo $id; ?>' ">supprimer</a></td>
<td><a href='javascript:EnablerInput(<? $ident; ?>);'>modifier</a></td> //the link to call the function below
</tr>
--------------------------------------------------------------------------------
the function is simple .... but doen't work
function EnablerInput(ident)
{
document.tablo_client.ident.disabled=false; // error message ; document.tablo_client.ident is not an object or is null
}
maybe should i create one form for each row ?