selectedIndex of -1 indicates that no options have been selected. so if (document...selectedIndex < 0) { alert('no options have been selected'); }
charlie ----- Original Message ----- From: "Salvador Delacosta" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, August 26, 2003 9:35 AM Subject: Re: OT: JavaScript question?? > Mario, > > try doing this. > document.....selectedIndex == null > > I believe that will tell check if the user has selected anything in the > drop-down box. > > Hope this helps. > > > >From: "Ciliotta, Mario" <[EMAIL PROTECTED]> > >Reply-To: [EMAIL PROTECTED] > >To: CF-Talk <[EMAIL PROTECTED]> > >Subject: OT: JavaScript question?? > >Date: Fri, 22 Aug 2003 18:07:16 -0400 > > > >Hi all, > > > >Sorry for the OT on JavaScript but I cannot figure out how to tell if > >someone has selected in option in the box. I know how to do it if the I > >add another option at the beginning: <OPTION VALUE="">Please select > >one.......</OPTION> and then use : document........options[0].selected to > >see if the first one is selected but I cannot figure out how to do it > >below. The users want the boxed sized to be the same a recordcount of the > >query. > > > > > ><SELECT NAME="Retention_Sub_Schedule" size=9> > > <OPTION VALUE="1700~CORPORATE SERVICES" >1700 - CORPORATE > >SERVICES</OPTION> > > <OPTION VALUE="1701~BUILDING & FACILITIES" >1701 - BUILDING & > >FACILITIES</OPTION> > > <OPTION VALUE="1702~CSD FINANCE & ACCOUNTS PAYABLE" >1702 - CSD > >FINANCE & ACCOUNTS PAYABLE</OPTION> > > <OPTION VALUE="1703~SECURITY" >1703 - SECURITY</OPTION> > > <OPTION VALUE="1704~INFORMATION MANAGEMENT" >1704 - INFORMATION > >MANAGEMENT</OPTION> > > <OPTION VALUE="1706~GSS" >1706 - GSS</OPTION> > > <OPTION VALUE="1707~ICSG" >1707 - ICSG</OPTION> > > <OPTION VALUE="1708~GENERAL SERVICES" >1708 - GENERAL > >SERVICES</OPTION> > > <OPTION VALUE="1710~LIS & ARM" >1710 - LIS & ARM</OPTION> > ></SELECT> > > > >Thanks > >Mario > > > >This message is for the named person's use only. It may contain sensitive > >and private proprietary or legally privileged information. No > >confidentiality or privilege is waived or lost by any mistransmission. If > >you are not the intended recipient, please immediately delete it and all > >copies of it from your system, destroy any hard copies of it and notify the > >sender. You must not, directly or indirectly, use, disclose, distribute, > >print, or copy any part of this message if you are not the intended > >recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE > >FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT > >SUISSE FIRST BOSTON reserve the right to monitor all e-mail communications > >through its networks. Any views expressed in this message are those of the > >individual sender, except where the message states otherwise and the sender > >is authorized to state them to be the views of any such entity. > >Unless otherwise stated, any pricing information given in this message is > >indicative only, is subject to change and does not constitute an offer to > >deal at any price quoted. Any reference to the terms of executed > >transactions should be treated as preliminary only and subject to our > >formal written confirmation. > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm