[Javascript] Using option box value to set the items of select object
Peter Brunone
peter at brunone.com
Mon Nov 12 14:27:31 CST 2001
Each Select menu is an array of .value and .text attributes that you can
change by knowing the index. For example, to change the first entry in the
list to display "Bill Murray" with a value of "BM", you would do this with
the appropriate form and select names:
formName.selectName.options[0].value = "BM";
formName.selectName.options[0].text = "Bill Murray";
----- Original Message -----
From: "M. Amin" <amin at imkenberg.net>
To: "WDVL" <wdvltalk at lists.internet.com>; "java-script"
<javascript at LaTech.edu>
Sent: Monday, November 12, 2001 2:03 PM
Subject: [Javascript] Using option box value to set the items of select
object
Dear All,
I've a situation in which i let the user to try to choose a country region
like Western or Eastern
and from his decision i list the appropriate country list in the same page,
i'd like to implement it using
Jscript but i don't know how can i affect the <Option> elements of Select
Object using the choosed region.
Any help will be appreciated.
Regards,
M. Amin
More information about the Javascript
mailing list