Hi, I have a table in HTML. I have made this table as editable by using Javascript. When the user clicks a cell, it will become editable. The problem here is, when the cell is already editable, if the user again clicks on the cell ...., some tags and other things appear.i.e. new text boxes appear for every click.
How this could be prevented?
I am using the following Javascript code.
function changeContent(tablecell)
{
//alert(tablecell.firstChild.nodeValue);
tablecell.innerHTML = "<INPUT type=text size=\"6\" name=newname onBlur=\"javascript:submitNewName(this);\" value=\""+tablecell.innerHTML+"\">";
tablecell.firstChild.focus();
}
function submitNewName(textfield)
{
//alert(textfield.value);
textfield.parentNode.innerHTML= textfield.value;
}