Hi,
just to make it clear:
I know the correct syntax in NS, but didn't write the reference to the form
(frmSecurity)
in my email to Elliott, beacuse I thought that he had a reference to the
form in a global
JavaScript variable called frmSecurity (my bad).
But thanks anyway! :-)
/Robert
-----Original Message-----
From: Konstantin Sokolovskiy [mailto:ske@u...]
Sent: den 21 december 2001 10:10
To: javascript
Cc: javascript
Subject: [javascript] RE: NS
Hello Robert,
Try to use
document.forms[form_name].elements["pkEmployeeID"].options[document.forms[fo
rm_name].elements["pkEmployeeID"].selectedIndex].value
And don't forget to add name attribute foe the form tag.
Friday, December 21, 2001, 11:08:54 AM, you wrote:
NR> Good that Chris gave you the answer.
NR> I thought that you had a variable called frmSecurity with a reference to
the
NR> form...
NR> /Robert
NR> -----Original Message-----
NR> From: O'Hara, Elliott M [mailto:EMOHARA@k...]
NR> Sent: den 20 december 2001 17:15
NR> To: javascript
NR> Subject: [javascript] RE: NS
NR> NS 4.7 give me a error doing that...
NR> that works in IE though
NR> I can't even get to the object
NR> an alert(frmSecurity) gives me an error....
NR> -----Original Message-----
NR> From: Nyman, Robert [mailto:Robert.Nyman@i...]
NR> Sent: Thursday, December 20, 2001 11:13 AM
NR> To: javascript
NR> Subject: [javascript] RE: NS
NR> frmSecurity.options[frmSecurity.selectedIndex].value
NR> /Robert
NR> -----Original Message-----
NR> From: O'Hara, Elliott M [mailto:EMOHARA@k...]
NR> Sent: den 20 december 2001 17:07
NR> To: javascript
NR> Subject: [javascript] NS
NR> Well, the day has come. I have to make an app that works in Gods Curse
to
NR> all web developers (Netscape).
NR> I need to grap the value of a select box
NR> <form id="frmSecurity" > <!--I'm cutting out what you don't need-->
NR> <select name="pkEmployeeID" id="pkEmployeeID">
NR> <!--asp stuff here but heres some sample output-->
NR> <option value="31">Eric Ranson</option>
NR> <option value="21">Elliott O'Hara</option>
NR> </select>
NR> </form>
NR> now in ie (god bless Bill Gates)
NR> all I have to do is
NR> frmSecurity,pkEmployeeID.value
NR> to retrieve the selected value
NR> what about Netscape???
NR> ---
NR>
NR>
$subst('Email.Unsub').
NR> ---
NR>
NR>
$subst('Email.Unsub').
NR> ---
NR>
NR>
$subst('Email.Unsub').
NR> ---
NR>
NR>
$subst('Email.Unsub').
--
Best regards,
Konstantin Sokolovskiy (mailto:ske@u...)
ICQ# 44424442