How can I sumit a form to a specific asp page based on a pulldownmenu value?

B

Brave

I have an asp form that gets submitted to an asp page that requests
more information.

I want to post to one of 5 different asp pages based on a pulldown
menu value.

I would like to automate the submit process. So something like this:

I fill out the form and choose option 1 from the pulldown.

Once the option is choosen, the form would automatically submit.

On the back end it would go something like
"if form field equals option 1, submit to asp page 1"
"if form field equals option 2, submit to asp page 2"

I can get the form to automatically submit to an asp page, and I can
use the response.redirect to send it correctly to the asp page I want
but it does not pass the form fields values over.

I have tried all my options and nothing os working so I am hoping
someone can show me a simple code that can accomplish this.

Thank you for taking the time to read my question. Any help you can
provide will be greatly appreiciated.
 
B

Bob Barrows

Brave said:
I have an asp form that gets submitted to an asp page that requests
more information.

I want to post to one of 5 different asp pages based on a pulldown
menu value.

I would like to automate the submit process. So something like this:

I fill out the form and choose option 1 from the pulldown.

Once the option is choosen, the form would automatically submit.

On the back end it would go something like
"if form field equals option 1, submit to asp page 1"
"if form field equals option 2, submit to asp page 2"

Look up Server.Transfer
 
H

Hal Rosser

Brave said:
I have an asp form that gets submitted to an asp page that requests
more information.

I want to post to one of 5 different asp pages based on a pulldown
menu value.

I would like to automate the submit process. So something like this:

I fill out the form and choose option 1 from the pulldown.

Once the option is choosen, the form would automatically submit.

On the back end it would go something like
"if form field equals option 1, submit to asp page 1"
"if form field equals option 2, submit to asp page 2"

I can get the form to automatically submit to an asp page, and I can
use the response.redirect to send it correctly to the asp page I want
but it does not pass the form fields values over.

I have tried all my options and nothing os working so I am hoping
someone can show me a simple code that can accomplish this.

Try using the onClick event handler for the select list - then depending on
which is selected use something like:
var theForm = getElementById("idOfTheForm") ;
theForm.action = "aspPage1.asp";
You just change the action attribute of the form using an event handler of
the dropDown element.
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top