Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to access a form element whose name is dynamically created? 1

Status
Not open for further replies.

inf33323

Technical User
Joined
Apr 24, 2001
Messages
26
Location
DE
Hi all,

could anybody tell my why this code is not working?

var Element1 = "ClassesRadio" + 1 + "[" + 0 + "]"
var Element = window.document.forms[0].Element1
Element.disabled=true

ClassesRadio1 is a group of radio buttons in my website.
I keep getting the message that Element is undefined.

Would appreciate any hint.

Christa
 
I found the solution, so forget this question. Have to use eval().

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top