Hi, I am getting error "Microsoft JScript runtime error: DOM Exception: INVALID_CHARACTER_ERR (5)" while trying to open a page, debugger stops at the line highlighted.
function createNewFormElement(inputForm, elementName, elementValue) {
var newElement = document.createElement("<input name='" + elementName + "' type='hidden'>");
inputForm.appendChild(newElement);
newElement.value = elementValue;
return newElement;
}
The same code is running well on my other machine and it's a running code on many machines (on same IE version) so I am not supposed to make any change in the code. What could be other possible reason, please assist. I have tried IE9 and and firefox 31.0