Hi, i want to change the hidden elemtn value in the javascript. the name of the filed will have to be formed in the javascript. like this var temp="name"+1; document.[B]temp[/B].value="newname"; i want temp to be replaced by name1 so that the value of name1 field shud change.like this "[B]document.name1.value="newvalue" [/B] " Code (markup): <input type='hidden' name='name1' value'Val'> Code (markup):
<input type="hidden" name="name1" value="Val" id="myID"/> PHP: var temp="name"+1; document.getElementById('myID').setAttribute('name',temp); document.getElementById('myID').value = "newvalue"; PHP: i dont test this..