Im trying do this basically:
var tr = document.createElement('tr'); var td = document.createElement('td'); td.appendChild(document.createTextNode('<input class='param' type='text' name='dummy' value='fred'/>')); tr.appendChild(td);
but it just displays the input… as normal text, how do I insert it so that it works as i require..?
im guessing its the createTextNode that needs to be changed?
Cheers
You could either
or
EDIT
ie won’t allow the type of a form element to be changed dynamically. I’m pretty sure this only applies when the element already has a type and has already been inserted into the DOM. Best to check though. If it doesn’t work use method 1