Can somebody help on this one. I am trying to set the name of a element dynamically.
Try using setAttribute.
Example:
var element = document.getElementById("xxx"); element.setAttribute("name", "sample");