hostfreak Posted September 3, 2007 Share Posted September 3, 2007 Say I have two inputs in a form that creates an array with the square-bracket syntax, example: <input name="Quantity[inventory]" type="text" /> <input name="Quantity[Commercial]" type="text" /> How would I access those values in javascript? I've tried getElementById() to no avail. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
vijayfreaks Posted September 4, 2007 Share Posted September 4, 2007 Hi.. for that you can do one thing.. assign unique id relatively names... and you can access it via document.getElementById('id'); Regards, Vijay Quote Link to comment Share on other sites More sharing options...
hostfreak Posted September 4, 2007 Author Share Posted September 4, 2007 I thought of that as a possibility, but just wanted to make sure there wasn't a better way. I will keep this open for now, in case someone does know of a better way. Thanks for the idea, that's what I will use for the time being. 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.