How to implement two drop-down list dependency in ASP/HTML/VBscript forms?

S

srini

Hi All,

I have an html form, C:\srini.html and it has two drop-down lists
(FieldA and FieldB) and one text field, Summary and then Submit and
Cancel buttons.

First when you click on FieldB, you should not see any drop down
entrees there. FieldA has two entrees (Test1 and Test2). When you
click on Test1 value in the FieldA drop-down list, it should show me
dynmically three values in the FieldB drop-down list (Apple, Banana,
and Mango). Again, when I click on Test value in the FieldA drop-down
list, it should show me dynmically anoher five values in the FieldB
drop-down list (San Jose, Fremont, Newark, Hayward, and Concord).

How can I implement this kind of dynamic intra-field dependency (only
from FieldA to FieldB) on the html form? I know that I should use some
asp script as well apart from srini.html.

Can some one guide me step by step with some appropriate code?

Thansk in advance,
Srini
 
W

Whitecrest

schimata2 said:
Hi All,
First when you click on FieldB, you should not see any drop down
entrees there. FieldA has two entrees (Test1 and Test2). When you
click on Test1 value in the FieldA drop-down list, it should show me
dynmically three values in the FieldB drop-down list (Apple, Banana,
and Mango)....

here are a few ways, there are others....

Use javascript (not viewable by all)

Use .net It can make a round trip to he server without refreshing the
page.
 
R

Richard

srini said:
I have an html form, C:\srini.html and it has two drop-down lists
(FieldA and FieldB) and one text field, Summary and then Submit and
Cancel buttons.
First when you click on FieldB, you should not see any drop down
entrees there. FieldA has two entrees (Test1 and Test2). When you
click on Test1 value in the FieldA drop-down list, it should show me
dynmically three values in the FieldB drop-down list (Apple, Banana,
and Mango). Again, when I click on Test value in the FieldA drop-down
list, it should show me dynmically anoher five values in the FieldB
drop-down list (San Jose, Fremont, Newark, Hayward, and Concord).
How can I implement this kind of dynamic intra-field dependency (only
from FieldA to FieldB) on the html form? I know that I should use some
asp script as well apart from srini.html.
Can some one guide me step by step with some appropriate code?
Thansk in advance,
Srini

http://us.creative.com/support/downloads/

This working model does what you want using javascript.

You might want to look for something similar using cgi.
 
Joined
Aug 30, 2010
Messages
1
Reaction score
0
Text box dependency

Hi All,
We have three text boxes, those all are depending on first text box, if we entered 999 in first text box remaining text boxes must be null (no alerts, not mandatory). If we entered other than 999 (means less than 999) then we must and should enter remaining two text boxes (mandatory). How can we go. please provide us example html code with java script. Helping will be really appreciated.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top