Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: How to get value of combo


Message #1 by "Joe Coppola" <joco@e...> on Mon, 29 Apr 2002 12:04:07 -0400
You also need two equals signs in your compare:
if (Value == "Any")

How do you access 'Value', this might make a difference?

Joe


>From: Joseph Coppola <joco@e...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] RE: How to get value of combo
>Date: Mon, 29 Apr 2002 23:07:07 -0400
>
>Thanks,
>
>Yea actually that was typos on my part in rewriting my example code....
>The real code has those corrections, but still doesn't work.
>
>Joe
>
>-----Original Message-----
>From: Boloian, John [mailto:jboloian@u...]
>Sent: Monday, April 29, 2002 12:25 PM
>To: javascript
>Subject: [javascript] RE: How to get value of combo
>
>
>Joe,
>
>Change the "documents..." line to:
>
>document.form1.elements[0].disabled=true
>
>(drop the 's' off 'documents' and make 'disable' into 'disabled')...
>
>-----Original Message-----
>From: Joe Coppola [mailto:joco@e...]
>Sent: Monday, April 29, 2002 12:04 PM
>To: javascript
>Subject: [javascript] How to get value of combo
>
>
>Heres the request.
>
>I have a form with 2 combo boxes and I would like that if you choose
>only value "A" in combo 2 that it will disable combo 1.
>
>I have written a function and used the onchange event in combo2, however
>I am trying to pass the value of combo2 to the function.  Here are
>EXAMPLES of the code.. I cannot seem to get the value of the
>
>Function DisableCombo(Value)
>{
>	if (Value="Any") {
>		documents.form1.elements[0].disable=true
>	}
>}
>
></script>
>
><select name="cmb2" onchange="DisableCombo(this.value)">
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
>
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


  Return to Index