Forum Moderators: mack

Message Too Old, No Replies

how to know the selected option value?

I wish to know the selected option value so that I can compare it with a st

         

pig80

1:49 am on Jul 22, 2004 (gmt 0)

10+ Year Member



I wish to know the selected option value so that I can compare it with a string eg: "Peter" so that I will know that "Peter" is selected.

Next, upon correct comparison, I wish to disable another box, how do i go abt doin that? All using Java script? Tks.

BlobFisk

2:25 pm on Jul 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, pig80!

You need to use the selectedIndex. In pseudocode:

if the selectedIndex value equals 'Peter' 
then disable the box named/with an ID of 'FOO'

HTH

pig80

6:52 pm on Jul 23, 2004 (gmt 0)

10+ Year Member



tanks bro!