jordanwb Posted September 4, 2009 Share Posted September 4, 2009 I have a form with multiple rows of the same data. When the user clicks on a link, it adds a row to the form. Each same field is named like so: <select name="0[type]"> **Options** </select> <select name="1[type]"> **Options** </select> So on and so forth. I try to get the value of the field like so: var value = document.form_name["0[type]"].selectedIndex; But it doesn't work. When the user clicks "Submit", I use javascript to make sure each field has a value. *Edit* Damn it. I'm an idiot. I was trying to get the selectedIndex of a select that didn't yet exist. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.