Forum Moderators: open
Now my query is:
How to call a javascript function from the dynamically generated html element.
for example:
1) i have generated a text box using a javascript function.
2) Now i have to call another function when that text box is clicked.How to add a JS function here?
Can any one please let me know?
if (document.getElementById && document.createElement)
{
var butt = document.createElement('BUTTON');
var buttext = document.createTextNode('Ready!');
butt.appendChild(buttext);
butt.onclick = saveEdit;
}
Hope that helps you.