Naming Form Fields
Question: How can I validate a dynamically generated dropdown list? The name of the list is totally different at run time from that of the code, well I managed to get the name but am not able to retrieve the value from it. I used eval also for that, but the name contains"-" sign and its not working in the eval function. Can you please suggest me any solution?
anonymous
Answer: Name attributes in HTML may contain letters, numbers, and underscores. No other characters are permitted. Putting a hyphen in a name attribute means that your HTML is invalid. Before you can get Javascript to work properly you need valid HTML for it to interact with. So the first step is to fix the HTML so that only valid characters appear in the field name.


