Based on a condition, I want to add new options into a form's SELECT
menu.
This method has been working for Firefox, but not IE/Opera/Avant:
document.form1.aem_from[0]=new Option("[ select ]","X");
(Although the Firefox JavascriptConsole would of course tell me it's
not good.)
Trying to get it to work in every other browser than Firefox...how the
heck to I format that using proper DOM?
I've tried:
document.getElementById('aem_from'[0])=new Option("[ select ]","X");
and with various other placements of quotes and positioning of the
array brackets, like:
document.getElementById('aem_from')[0]=new Option("[ select ]","X");
and:
document.getElementById('aem_from[0]')=new Option("[ select ]","X");
and it none of it works in any browser and the Console simply says I
have an "invalid assignment left-hand side".
I tried doing a search on the newsgroup...but I can't find anything
quite like this. Maybe threads that are similar, but I didn't grok it
enough to carry over the lesson given. My understanding of JavaScript
is less "understanding" and more "seething hatred of a necessary evil
in my life." =)
Thanks for any suggestions!
Liam