Question about pull down menus on asp forms.

B

Brave

I have two questions about pulldown menus on forms.

1: Can I have the options of one pulldown menu be dictated by the
choice from another pulldown menu (example beow)?

2: Can I have a form be submitted when a choice is made in a pulldown
menu (example below)?

Example of question 1:

I have a form with two pulldown menus. The first one has two options.

1: LETTERS
2: NUMBERS

If I choose LETTERS, then the second menu offers the options A, B, and
C.
If I choose NUMBERS, the the second menu offers the options 1, 2, and
3.

Example of question 2:

Lets say (using the example above) I choose LETTERS from menu 1.
I then choose B from the menu 2. Once I choose the last option, I
would like to have the form automatically submit.

This functionality is new to me so I am not sure how to go about
creating the code. Any samples you can offer would be greatly
appreciated. Here is how I would make the form for the example above
but past that, I am lost.

<form method="POST" action="FormProcesspage.asp">

<p><select size="1" name="menu1">
<option>Letters</option>
<option>Numbers</option>
</select></p>

<p><select size="1" name="menu2">
<option>A or 1</option>(dictated by menu1)
<option>B or 2</option>(dictated by menu1)
<option>C or 3</option>(dictated by menu1)
</select></p>

<p><input type="submit" value="Submit"></p>

</form>

Thank you for taing the time to read my inquiry, and for any help (and
hopfully code samples) you can offer.
 
E

Evertjan.

Brave wrote on 23 mrt 2007 in microsoft.public.inetserver.asp.general:
I have two questions about pulldown menus on forms.

1: Can I have the options of one pulldown menu be dictated by the
choice from another pulldown menu (example beow)?

2: Can I have a form be submitted when a choice is made in a pulldown
menu (example below)?

Example of question 1:

I have a form with two pulldown menus. The first one has two options.

1: LETTERS
2: NUMBERS

If I choose LETTERS, then the second menu offers the options A, B, and
C.
If I choose NUMBERS, the the second menu offers the options 1, 2, and
3.

Example of question 2:

Lets say (using the example above) I choose LETTERS from menu 1.
I then choose B from the menu 2. Once I choose the last option, I
would like to have the form automatically submit.

This functionality is new to me so I am not sure how to go about
creating the code. Any samples you can offer would be greatly
appreciated. Here is how I would make the form for the example above
but past that, I am lost.

<form method="POST" action="FormProcesspage.asp">

<p><select size="1" name="menu1">
<option>Letters</option>
<option>Numbers</option>
</select></p>

<p><select size="1" name="menu2">
<option>A or 1</option>(dictated by menu1)
<option>B or 2</option>(dictated by menu1)
<option>C or 3</option>(dictated by menu1)
</select></p>

<p><input type="submit" value="Submit"></p>

</form>

Thank you for taing the time to read my inquiry, and for any help (and
hopfully code samples) you can offer.

And what is your ASP question?

Remember: ASP is a platform for serverside code, either vbs or jscript,
ans your question concerns only clientside code.
 
M

Marc

Brave said:
I have two questions about pulldown menus on forms.

1: Can I have the options of one pulldown menu be dictated by the
choice from another pulldown menu (example beow)?

2: Can I have a form be submitted when a choice is made in a pulldown
menu (example below)?

Example of question 1:

I have a form with two pulldown menus. The first one has two options.

1: LETTERS
2: NUMBERS

If I choose LETTERS, then the second menu offers the options A, B, and
C.
If I choose NUMBERS, the the second menu offers the options 1, 2, and
3.

Example of question 2:

Lets say (using the example above) I choose LETTERS from menu 1.
I then choose B from the menu 2. Once I choose the last option, I
would like to have the form automatically submit.

This functionality is new to me so I am not sure how to go about
creating the code. Any samples you can offer would be greatly
appreciated. Here is how I would make the form for the example above
but past that, I am lost.

<form method="POST" action="FormProcesspage.asp">

<p><select size="1" name="menu1">
<option>Letters</option>
<option>Numbers</option>
</select></p>

<p><select size="1" name="menu2">
<option>A or 1</option>(dictated by menu1)
<option>B or 2</option>(dictated by menu1)
<option>C or 3</option>(dictated by menu1)
</select></p>

<p><input type="submit" value="Submit"></p>

</form>

Thank you for taing the time to read my inquiry, and for any help (and
hopfully code samples) you can offer.

Although I live in the same country as Evertjan you and everyone else should
notice that we are not all the same...
so here's what you are actualy looking for:
http://classicasp.aspfaq.com/forms/how-do-i-make-one-dropdown-depend-on-another.html
 
B

Bob Barrows [MVP]

Marc said:
Although I live in the same country as Evertjan you and everyone else
should notice that we are not all the same...
so here's what you are actualy looking for:
http://classicasp.aspfaq.com/forms/how-do-i-make-one-dropdown-depend-on-another.html

Thank you for providing the answer; however, by not also redirecting him to
a client-side scripting newsgroup, you did a little disservice to the
poster. Note that your reply to his offtopic post came 5 hours after he
posted it. If he had posted it to a client-side scripting group (such as
microsoft.public.scripting.jscript), I submit he would have had an answer in
minutes instead of hours. My goal when I tell a user he's posted in the
wrong place is to help the user get assistance more efficiently, not to play
net cop. I like to think that that is Evertjian's goal as well.
 
A

Anthony Jones

Bob Barrows said:
http://classicasp.aspfaq.com/forms/how-do-i-make-one-dropdown-depend-on-another.html

Thank you for providing the answer; however, by not also redirecting him to
a client-side scripting newsgroup, you did a little disservice to the
poster. Note that your reply to his offtopic post came 5 hours after he
posted it. If he had posted it to a client-side scripting group (such as
microsoft.public.scripting.jscript), I submit he would have had an answer in
minutes instead of hours. My goal when I tell a user he's posted in the
wrong place is to help the user get assistance more efficiently, not to play
net cop. I like to think that that is Evertjian's goal as well.

Bob, I think your too generous.

Evertjan first asked this question:-

'And what is your ASP question?'

Can that be read as anything other than sarcastic?

Sarcasm has it's place in the face of the willfully ignorant but not
directed to an original post.

What defines off topic anyway?

Are you entirely sure that can't ASP at least be part of the solution?

I've got loads of such circumstances where supplementary posts to the server
are necessary to build the content of other controls.

If such a question is off topic why does aspfaq contain an answer?
 
B

Bob Barrows [MVP]

Anthony said:
Bob, I think your too generous.
Maybe.

What defines off topic anyway?

Are you entirely sure that can't ASP at least be part of the solution?

Of course it can be, but dynamic lists ALWAYS involve client-side scripting.
I've got loads of such circumstances where supplementary posts to the
server
are necessary to build the content of other controls.

I really was responding to this particular case, which clearly did not
involve a supplementary post to the server. Forced to make a distinction, I
would say that asking how to code the page that provides the response to
that supplemental post is ontopic. Asking how to write the client-side
script to cause that supplemental post to be made is better handled by the
javascript experts over in the scripting groups. If you're an expert in both
technologies, feel free to provide an answer to the question. I know I have
provided answers in similar situations. I'm just saying the answer could be
more quickly obtained in the scripting newsgroup.
If such a question is off topic why does aspfaq contain an answer?

I can't speak for Aaron, but I would assume it's a concession to its being
asked so frequently. You will note that he really does not provide an answer
in that article except for providing links to javascript solutions.
 
B

Brave

Of course it can be, but dynamic lists ALWAYS involve client-side scripting.




I really was responding to this particular case, which clearly did not
involve a supplementary post to the server. Forced to make a distinction, I
would say that asking how to code the page that provides the response to
that supplemental post is ontopic. Asking how to write the client-side
script to cause that supplemental post to be made is better handled by the
javascript experts over in the scripting groups. If you're an expert in both
technologies, feel free to provide an answer to the question. I know I have
provided answers in similar situations. I'm just saying the answer could be
more quickly obtained in the scripting newsgroup.


I can't speak for Aaron, but I would assume it's a concession to its being
asked so frequently. You will note that he really does not provide an answer
in that article except for providing links to javascript solutions.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"- Hide quoted text -

- Show quoted text -

Thank you to everyone for taking the time, and thanks for giving me a
different group to ask these questions. I have always been happy withe
response I get from my posts, and I still am. EVERYONE have a great
day!
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top