"POST" action to various forms ?

W

Wayne-I-M

Hi all

I am using
<form method="POST" name="Form1" action="Form2.asp">
To send text box contents to the next form in the process.


Is it possible to "POST" the same info (text box contents) to a number of
different forms. Of course a user can only select 1 option from the dropdown.

As an example
Text box = John Smith
Jump menu to Form 2
Jump menu to Form 3
Jump menu to Form 4

Of course they can only go to one of the forms but I would like the contents
of the text box to be available on whichever form they select.

Something like this (this doesn't work)
<form method="POST" name="Form1" action="Form2.asp" Or "Form3.asp" Or
"Form4.asp">

Is this even possible in FP

Many thanks
 
S

Stefan B Rusynko

Either use a VBscript variable for your action attribute in the form tag or a response.redirect on the receiving page to send to any
other page based on the values received from the form




| Hi all
|
| I am using
| <form method="POST" name="Form1" action="Form2.asp">
| To send text box contents to the next form in the process.
|
|
| Is it possible to "POST" the same info (text box contents) to a number of
| different forms. Of course a user can only select 1 option from the dropdown.
|
| As an example
| Text box = John Smith
| Jump menu to Form 2
| Jump menu to Form 3
| Jump menu to Form 4
|
| Of course they can only go to one of the forms but I would like the contents
| of the text box to be available on whichever form they select.
|
| Something like this (this doesn't work)
| <form method="POST" name="Form1" action="Form2.asp" Or "Form3.asp" Or
| "Form4.asp">
|
| Is this even possible in FP
|
| Many thanks
|
| --
| Wayne
| Manchester, England.
|
 
W

Wayne-I-M

Hi Stefan

Thanks for getting back to me. I have been going mad with this. (In access
is really simple LoL) Oh well.

I have

<form method="POST" name="ThisForm" action="NextForm.asp">

I have tried inserting a variable into the name section but can't find the
sintax.

I have a dropdown menu
<select size="1" name="Something" id="SomeID">
<option selected>Select</option>
<option value="SomeOtherForm1">1</option>
<option value="SomeOtherForm2">2</option>
<option value="SomeOtherForm3">3</option>
<option value="SomeOtherForm4">4</option>

What I am trying to get is that the next form open will be the choice
selected from the drop down. So I think I need to insert SomeID" into the
post action. But it doesn't work the ways I have tried.

Any ideas would be "really" helpful.
 
S

Stefan B Rusynko

Create 1 page to receive the form values (NextForm.asp)
- process the form values there and create Session variables from them using

<%
Session("Something") = Cint(Request.Form("Something"))
%>
, etc for your other form fields
Then after the processing use a response redirect based on the value

<%
Select Session("Something")
Case 1
Response.redirect "NextForm1page.asp"
Case 2
Response.redirect "NextForm2page.asp"
Case 3
Response.redirect "NextForm3page.asp"
Case 4
Response.redirect "NextForm4page.asp"
Case Else
Response.redirect "SomeDefaultpage.asp"
End Select
%>




| Hi Stefan
|
| Thanks for getting back to me. I have been going mad with this. (In access
| is really simple LoL) Oh well.
|
| I have
|
| <form method="POST" name="ThisForm" action="NextForm.asp">
|
| I have tried inserting a variable into the name section but can't find the
| sintax.
|
| I have a dropdown menu
| <select size="1" name="Something" id="SomeID">
| <option selected>Select</option>
| <option value="SomeOtherForm1">1</option>
| <option value="SomeOtherForm2">2</option>
| <option value="SomeOtherForm3">3</option>
| <option value="SomeOtherForm4">4</option>
|
| What I am trying to get is that the next form open will be the choice
| selected from the drop down. So I think I need to insert SomeID" into the
| post action. But it doesn't work the ways I have tried.
|
| Any ideas would be "really" helpful.
|
|
|
| --
| Wayne
| Manchester, England.
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Either use a VBscript variable for your action attribute in the form tag or a response.redirect on the receiving page to send to
any
| > other page based on the values received from the form
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Hi all
| > |
| > | I am using
| > | <form method="POST" name="Form1" action="Form2.asp">
| > | To send text box contents to the next form in the process.
| > |
| > |
| > | Is it possible to "POST" the same info (text box contents) to a number of
| > | different forms. Of course a user can only select 1 option from the dropdown.
| > |
| > | As an example
| > | Text box = John Smith
| > | Jump menu to Form 2
| > | Jump menu to Form 3
| > | Jump menu to Form 4
| > |
| > | Of course they can only go to one of the forms but I would like the contents
| > | of the text box to be available on whichever form they select.
| > |
| > | Something like this (this doesn't work)
| > | <form method="POST" name="Form1" action="Form2.asp" Or "Form3.asp" Or
| > | "Form4.asp">
| > |
| > | Is this even possible in FP
| > |
| > | Many thanks
| > |
| > | --
| > | Wayne
| > | Manchester, England.
| > |
| >
| >
| >
 
W

Wayne-I-M

Ha Ha - if it were possible to shout Eureka over the web then you would now
be hearing :)

Many thanks - works like a dream.

I hope you had a good Christmas and will have a really great New Year



--
Wayne
Manchester, England.



Stefan B Rusynko said:
Create 1 page to receive the form values (NextForm.asp)
- process the form values there and create Session variables from them using

<%
Session("Something") = Cint(Request.Form("Something"))
%>
, etc for your other form fields
Then after the processing use a response redirect based on the value

<%
Select Session("Something")
Case 1
Response.redirect "NextForm1page.asp"
Case 2
Response.redirect "NextForm2page.asp"
Case 3
Response.redirect "NextForm3page.asp"
Case 4
Response.redirect "NextForm4page.asp"
Case Else
Response.redirect "SomeDefaultpage.asp"
End Select
%>




| Hi Stefan
|
| Thanks for getting back to me. I have been going mad with this. (In access
| is really simple LoL) Oh well.
|
| I have
|
| <form method="POST" name="ThisForm" action="NextForm.asp">
|
| I have tried inserting a variable into the name section but can't find the
| sintax.
|
| I have a dropdown menu
| <select size="1" name="Something" id="SomeID">
| <option selected>Select</option>
| <option value="SomeOtherForm1">1</option>
| <option value="SomeOtherForm2">2</option>
| <option value="SomeOtherForm3">3</option>
| <option value="SomeOtherForm4">4</option>
|
| What I am trying to get is that the next form open will be the choice
| selected from the drop down. So I think I need to insert SomeID" into the
| post action. But it doesn't work the ways I have tried.
|
| Any ideas would be "really" helpful.
|
|
|
| --
| Wayne
| Manchester, England.
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Either use a VBscript variable for your action attribute in the form tag or a response.redirect on the receiving page to send to
any
| > other page based on the values received from the form
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Hi all
| > |
| > | I am using
| > | <form method="POST" name="Form1" action="Form2.asp">
| > | To send text box contents to the next form in the process.
| > |
| > |
| > | Is it possible to "POST" the same info (text box contents) to a number of
| > | different forms. Of course a user can only select 1 option from the dropdown.
| > |
| > | As an example
| > | Text box = John Smith
| > | Jump menu to Form 2
| > | Jump menu to Form 3
| > | Jump menu to Form 4
| > |
| > | Of course they can only go to one of the forms but I would like the contents
| > | of the text box to be available on whichever form they select.
| > |
| > | Something like this (this doesn't work)
| > | <form method="POST" name="Form1" action="Form2.asp" Or "Form3.asp" Or
| > | "Form4.asp">
| > |
| > | Is this even possible in FP
| > |
| > | Many thanks
| > |
| > | --
| > | Wayne
| > | Manchester, England.
| > |
| >
| >
| >
 
W

Wayne-I-M

Oh god. It was working on a test page. But .....

I am trying to get the next page to redirect - this is the page. The select
rooms at the bottom of the form that "should" cause the redirect.

http://www.folgarida.co.uk/page_booking2.asp

This is the code I'm using
<%
Session("strSelect_Rooms") = Cint(Request.Form("Select_Rooms"))
%>

<%
Select Session("strSelect_Rooms")
Case 1
Response.redirect "Page_Room1.asp"
Case 2
Response.redirect "Page_Room2.asp"
Case 3
Response.redirect "Page_Room3.asp"
Case 4
End Select
%>

Obviously doing something wrong

Any ideas would be great. Thanks
--
Wayne
Manchester, England.



Wayne-I-M said:
Ha Ha - if it were possible to shout Eureka over the web then you would now
be hearing :)

Many thanks - works like a dream.

I hope you had a good Christmas and will have a really great New Year



--
Wayne
Manchester, England.



Stefan B Rusynko said:
Create 1 page to receive the form values (NextForm.asp)
- process the form values there and create Session variables from them using

<%
Session("Something") = Cint(Request.Form("Something"))
%>
, etc for your other form fields
Then after the processing use a response redirect based on the value

<%
Select Session("Something")
Case 1
Response.redirect "NextForm1page.asp"
Case 2
Response.redirect "NextForm2page.asp"
Case 3
Response.redirect "NextForm3page.asp"
Case 4
Response.redirect "NextForm4page.asp"
Case Else
Response.redirect "SomeDefaultpage.asp"
End Select
%>




| Hi Stefan
|
| Thanks for getting back to me. I have been going mad with this. (In access
| is really simple LoL) Oh well.
|
| I have
|
| <form method="POST" name="ThisForm" action="NextForm.asp">
|
| I have tried inserting a variable into the name section but can't find the
| sintax.
|
| I have a dropdown menu
| <select size="1" name="Something" id="SomeID">
| <option selected>Select</option>
| <option value="SomeOtherForm1">1</option>
| <option value="SomeOtherForm2">2</option>
| <option value="SomeOtherForm3">3</option>
| <option value="SomeOtherForm4">4</option>
|
| What I am trying to get is that the next form open will be the choice
| selected from the drop down. So I think I need to insert SomeID" into the
| post action. But it doesn't work the ways I have tried.
|
| Any ideas would be "really" helpful.
|
|
|
| --
| Wayne
| Manchester, England.
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Either use a VBscript variable for your action attribute in the form tag or a response.redirect on the receiving page to send to
any
| > other page based on the values received from the form
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Hi all
| > |
| > | I am using
| > | <form method="POST" name="Form1" action="Form2.asp">
| > | To send text box contents to the next form in the process.
| > |
| > |
| > | Is it possible to "POST" the same info (text box contents) to a number of
| > | different forms. Of course a user can only select 1 option from the dropdown.
| > |
| > | As an example
| > | Text box = John Smith
| > | Jump menu to Form 2
| > | Jump menu to Form 3
| > | Jump menu to Form 4
| > |
| > | Of course they can only go to one of the forms but I would like the contents
| > | of the text box to be available on whichever form they select.
| > |
| > | Something like this (this doesn't work)
| > | <form method="POST" name="Form1" action="Form2.asp" Or "Form3.asp" Or
| > | "Form4.asp">
| > |
| > | Is this even possible in FP
| > |
| > | Many thanks
| > |
| > | --
| > | Wayne
| > | Manchester, England.
| > |
| >
| >
| >
 
S

Stefan B Rusynko

Make sure Select_Rooms is an integer
- then the select Should just be 3 cases
<%
IF IsNumeric(Request.Form("Select_Rooms")) THEN
Session("strSelect_Rooms") = Cint(Request.Form("Select_Rooms"))
Select Session("strSelect_Rooms")
Case 1
Response.redirect "Page_Room1.asp"
Case 2
Response.redirect "Page_Room2.asp"
Case 3
Response.redirect "Page_Room3.asp"
End Select
ELSE
Response.redirect "Startingpage.asp" 'Error in Select_rooms
END IF
%>





| Oh god. It was working on a test page. But .....
|
| I am trying to get the next page to redirect - this is the page. The select
| rooms at the bottom of the form that "should" cause the redirect.
|
| http://www.folgarida.co.uk/page_booking2.asp
|
| This is the code I'm using
| <%
| Session("strSelect_Rooms") = Cint(Request.Form("Select_Rooms"))
| %>
|
| <%
| Select Session("strSelect_Rooms")
| Case 1
| Response.redirect "Page_Room1.asp"
| Case 2
| Response.redirect "Page_Room2.asp"
| Case 3
| Response.redirect "Page_Room3.asp"
| Case 4
| End Select
| %>
|
| Obviously doing something wrong
|
| Any ideas would be great. Thanks
| --
| Wayne
| Manchester, England.
|
|
|
| "Wayne-I-M" wrote:
|
| > Ha Ha - if it were possible to shout Eureka over the web then you would now
| > be hearing :)
| >
| > Many thanks - works like a dream.
| >
| > I hope you had a good Christmas and will have a really great New Year
| >
| >
| >
| > --
| > Wayne
| > Manchester, England.
| >
| >
| >
| > "Stefan B Rusynko" wrote:
| >
| > > Create 1 page to receive the form values (NextForm.asp)
| > > - process the form values there and create Session variables from them using
| > >
| > > <%
| > > Session("Something") = Cint(Request.Form("Something"))
| > > %>
| > > , etc for your other form fields
| > > Then after the processing use a response redirect based on the value
| > >
| > > <%
| > > Select Session("Something")
| > > Case 1
| > > Response.redirect "NextForm1page.asp"
| > > Case 2
| > > Response.redirect "NextForm2page.asp"
| > > Case 3
| > > Response.redirect "NextForm3page.asp"
| > > Case 4
| > > Response.redirect "NextForm4page.asp"
| > > Case Else
| > > Response.redirect "SomeDefaultpage.asp"
| > > End Select
| > > %>
| > >
| > > --
| > >
| > > _____________________________________________
| > > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > > "Warning - Using the F1 Key will not break anything!" (-;
| > > To find the best Newsgroup for FrontPage support see:
| > > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > > _____________________________________________
| > >
| > >
| > > | Hi Stefan
| > > |
| > > | Thanks for getting back to me. I have been going mad with this. (In access
| > > | is really simple LoL) Oh well.
| > > |
| > > | I have
| > > |
| > > | <form method="POST" name="ThisForm" action="NextForm.asp">
| > > |
| > > | I have tried inserting a variable into the name section but can't find the
| > > | sintax.
| > > |
| > > | I have a dropdown menu
| > > | <select size="1" name="Something" id="SomeID">
| > > | <option selected>Select</option>
| > > | <option value="SomeOtherForm1">1</option>
| > > | <option value="SomeOtherForm2">2</option>
| > > | <option value="SomeOtherForm3">3</option>
| > > | <option value="SomeOtherForm4">4</option>
| > > |
| > > | What I am trying to get is that the next form open will be the choice
| > > | selected from the drop down. So I think I need to insert SomeID" into the
| > > | post action. But it doesn't work the ways I have tried.
| > > |
| > > | Any ideas would be "really" helpful.
| > > |
| > > |
| > > |
| > > | --
| > > | Wayne
| > > | Manchester, England.
| > > |
| > > |
| > > |
| > > | "Stefan B Rusynko" wrote:
| > > |
| > > | > Either use a VBscript variable for your action attribute in the form tag or a response.redirect on the receiving page to
send to
| > > any
| > > | > other page based on the values received from the form
| > > | >
| > > | > --
| > > | >
| > > | > _____________________________________________
| > > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > > | > "Warning - Using the F1 Key will not break anything!" (-;
| > > | > To find the best Newsgroup for FrontPage support see:
| > > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > > | > _____________________________________________
| > > | >
| > > | >
| > > | > | Hi all
| > > | > |
| > > | > | I am using
| > > | > | <form method="POST" name="Form1" action="Form2.asp">
| > > | > | To send text box contents to the next form in the process.
| > > | > |
| > > | > |
| > > | > | Is it possible to "POST" the same info (text box contents) to a number of
| > > | > | different forms. Of course a user can only select 1 option from the dropdown.
| > > | > |
| > > | > | As an example
| > > | > | Text box = John Smith
| > > | > | Jump menu to Form 2
| > > | > | Jump menu to Form 3
| > > | > | Jump menu to Form 4
| > > | > |
| > > | > | Of course they can only go to one of the forms but I would like the contents
| > > | > | of the text box to be available on whichever form they select.
| > > | > |
| > > | > | Something like this (this doesn't work)
| > > | > | <form method="POST" name="Form1" action="Form2.asp" Or "Form3.asp" Or
| > > | > | "Form4.asp">
| > > | > |
| > > | > | Is this even possible in FP
| > > | > |
| > > | > | Many thanks
| > > | > |
| > > | > | --
| > > | > | Wayne
| > > | > | Manchester, England.
| > > | > |
| > > | >
| > > | >
| > > | >
| > >
| > >
| > >
 
W

Wayne-I-M

Thank you Stefan.

I have simply added 3 more forms (they are only very small) to the site and
used a jump menu to get to the form required. The problem was is that I
spent all day yesterday trying to get it to work and....

I will have another go it next week using your suggestion.

Many thanks for your input

--
Wayne
Manchester, England.



Stefan B Rusynko said:
Make sure Select_Rooms is an integer
- then the select Should just be 3 cases
<%
IF IsNumeric(Request.Form("Select_Rooms")) THEN
Session("strSelect_Rooms") = Cint(Request.Form("Select_Rooms"))
Select Session("strSelect_Rooms")
Case 1
Response.redirect "Page_Room1.asp"
Case 2
Response.redirect "Page_Room2.asp"
Case 3
Response.redirect "Page_Room3.asp"
End Select
ELSE
Response.redirect "Startingpage.asp" 'Error in Select_rooms
END IF
%>





| Oh god. It was working on a test page. But .....
|
| I am trying to get the next page to redirect - this is the page. The select
| rooms at the bottom of the form that "should" cause the redirect.
|
| http://www.folgarida.co.uk/page_booking2.asp
|
| This is the code I'm using
| <%
| Session("strSelect_Rooms") = Cint(Request.Form("Select_Rooms"))
| %>
|
| <%
| Select Session("strSelect_Rooms")
| Case 1
| Response.redirect "Page_Room1.asp"
| Case 2
| Response.redirect "Page_Room2.asp"
| Case 3
| Response.redirect "Page_Room3.asp"
| Case 4
| End Select
| %>
|
| Obviously doing something wrong
|
| Any ideas would be great. Thanks
| --
| Wayne
| Manchester, England.
|
|
|
| "Wayne-I-M" wrote:
|
| > Ha Ha - if it were possible to shout Eureka over the web then you would now
| > be hearing :)
| >
| > Many thanks - works like a dream.
| >
| > I hope you had a good Christmas and will have a really great New Year
| >
| >
| >
| > --
| > Wayne
| > Manchester, England.
| >
| >
| >
| > "Stefan B Rusynko" wrote:
| >
| > > Create 1 page to receive the form values (NextForm.asp)
| > > - process the form values there and create Session variables from them using
| > >
| > > <%
| > > Session("Something") = Cint(Request.Form("Something"))
| > > %>
| > > , etc for your other form fields
| > > Then after the processing use a response redirect based on the value
| > >
| > > <%
| > > Select Session("Something")
| > > Case 1
| > > Response.redirect "NextForm1page.asp"
| > > Case 2
| > > Response.redirect "NextForm2page.asp"
| > > Case 3
| > > Response.redirect "NextForm3page.asp"
| > > Case 4
| > > Response.redirect "NextForm4page.asp"
| > > Case Else
| > > Response.redirect "SomeDefaultpage.asp"
| > > End Select
| > > %>
| > >
| > > --
| > >
| > > _____________________________________________
| > > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > > "Warning - Using the F1 Key will not break anything!" (-;
| > > To find the best Newsgroup for FrontPage support see:
| > > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > > _____________________________________________
| > >
| > >
| > > | Hi Stefan
| > > |
| > > | Thanks for getting back to me. I have been going mad with this. (In access
| > > | is really simple LoL) Oh well.
| > > |
| > > | I have
| > > |
| > > | <form method="POST" name="ThisForm" action="NextForm.asp">
| > > |
| > > | I have tried inserting a variable into the name section but can't find the
| > > | sintax.
| > > |
| > > | I have a dropdown menu
| > > | <select size="1" name="Something" id="SomeID">
| > > | <option selected>Select</option>
| > > | <option value="SomeOtherForm1">1</option>
| > > | <option value="SomeOtherForm2">2</option>
| > > | <option value="SomeOtherForm3">3</option>
| > > | <option value="SomeOtherForm4">4</option>
| > > |
| > > | What I am trying to get is that the next form open will be the choice
| > > | selected from the drop down. So I think I need to insert SomeID" into the
| > > | post action. But it doesn't work the ways I have tried.
| > > |
| > > | Any ideas would be "really" helpful.
| > > |
| > > |
| > > |
| > > | --
| > > | Wayne
| > > | Manchester, England.
| > > |
| > > |
| > > |
| > > | "Stefan B Rusynko" wrote:
| > > |
| > > | > Either use a VBscript variable for your action attribute in the form tag or a response.redirect on the receiving page to
send to
| > > any
| > > | > other page based on the values received from the form
| > > | >
| > > | > --
| > > | >
| > > | > _____________________________________________
| > > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > > | > "Warning - Using the F1 Key will not break anything!" (-;
| > > | > To find the best Newsgroup for FrontPage support see:
| > > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > > | > _____________________________________________
| > > | >
| > > | >
| > > | > | Hi all
| > > | > |
| > > | > | I am using
| > > | > | <form method="POST" name="Form1" action="Form2.asp">
| > > | > | To send text box contents to the next form in the process.
| > > | > |
| > > | > |
| > > | > | Is it possible to "POST" the same info (text box contents) to a number of
| > > | > | different forms. Of course a user can only select 1 option from the dropdown.
| > > | > |
| > > | > | As an example
| > > | > | Text box = John Smith
| > > | > | Jump menu to Form 2
| > > | > | Jump menu to Form 3
| > > | > | Jump menu to Form 4
| > > | > |
| > > | > | Of course they can only go to one of the forms but I would like the contents
| > > | > | of the text box to be available on whichever form they select.
| > > | > |
| > > | > | Something like this (this doesn't work)
| > > | > | <form method="POST" name="Form1" action="Form2.asp" Or "Form3.asp" Or
| > > | > | "Form4.asp">
| > > | > |
| > > | > | Is this even possible in FP
| > > | > |
| > > | > | Many thanks
| > > | > |
| > > | > | --
| > > | > | Wayne
| > > | > | Manchester, England.
| > > | > |
| > > | >
| > > | >
| > > | >
| > >
| > >
| > >
 

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

Top