Square Brackets in Form Names
Hi there Java ppl,
I'm quite an experienced PHP developer, but very new to Java. And iv got a prb thats been a big headache:
I'm using square brackets to name my (PHP-generated) form elements so that they form an array. ie.
Now I want to write some Java whereby you can click a button and the select boxes change their selected value. But when I name elements with the square brackets I can't refer to them!
document.forms.info[selectBox].selectedIndex = 0; as well as:
document.forms.elements.selectedIndex = 0;
Nothing works! Please help me, I cant sleep when iv got a coding problem!