I have a table and I made it editable, thats why its cells will become textbox on clicking each cell.
The code is
function changeContent(tablecell)
{
tablecell.innerHTML = "<INPUT type=text name=newname onBlur=\"javascript:submitNewName(this);\" value=\""+tablecell.innerHTML+" \">";
tablecell.firstChild.focus();
}
I would like to display a dropdown list instead of textbox. Also that drop down should have the options Daily and Monthly.
How can I do that?
Static strings example:
But to be honest I do not like the static string approach. You would be better using the JS DOM functions.
Something like:
I haven’t tested the code so there may be some syntax errors but the principle is correct