|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HTTP Redirect with POST
I need to redirect to another web page, but that redirect will include the
submission of form data. So, unlike ServerXMLHTTP which stays on the originating web page, I need the script to redirect to the page that I'm submitting the POST data to (without pressing a submit button). Any suggestions? Thanks, Victor
Show quote
"Victor" <bl***@blank.com> wrote in message Hi,news:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... > I need to redirect to another web page, but that redirect will include the > submission of form data. So, unlike ServerXMLHTTP which stays on the > originating web page, I need the script to redirect to the page that I'm > submitting the POST data to (without pressing a submit button). > > Any suggestions? > > Thanks, > > Victor > > > You can post the data using client side javascript or thru querystrings Regards Vinod 3 options that I can think of.
1) use querystring values 2) pass the redirect to a clienside FORM.SUBMIT() 3) store the values in a db/file then retrieve on the next page Show quote "Victor" <bl***@blank.com> wrote in message news:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... >I need to redirect to another web page, but that redirect will include the > submission of form data. So, unlike ServerXMLHTTP which stays on the > originating web page, I need the script to redirect to the page that I'm > submitting the POST data to (without pressing a submit button). > > Any suggestions? > > Thanks, > > Victor > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message For security reasons, it needs to be a POST and not querystring.news:%236cbI3iGFHA.3376@TK2MSFTNGP14.phx.gbl... > 3 options that I can think of. > 1) use querystring values > 2) pass the redirect to a clienside FORM.SUBMIT() This is what I'm considering.... it's javascript and is a small securitycompromise, but it may work. > 3) store the values in a db/file then retrieve on the next page The destination POST is to a page that I don't control, so I can't do that.Thanks, Curt & everyone, Victor Show quote > > -- > Curt Christianson > Site & Scripts: http://www.Darkfalz.com > Blog: http://blog.Darkfalz.com > > > "Victor" <bl***@blank.com> wrote in message > news:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... > >I need to redirect to another web page, but that redirect will include the > > submission of form data. So, unlike ServerXMLHTTP which stays on the > > originating web page, I need the script to redirect to the page that I'm > > submitting the POST data to (without pressing a submit button). > > > > Any suggestions? > > > > Thanks, > > > > Victor > > > > > > > > "Victor" wrote in message news:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... I'm doing the second one Curt mentioned so I can post the data, perform more :I need to redirect to another web page, but that redirect will include the : submission of form data. So, unlike ServerXMLHTTP which stays on the : originating web page, I need the script to redirect to the page that I'm : submitting the POST data to (without pressing a submit button). processing with ASP and then have the form submit to another page when it is rendered to the client. I take input from the client who then submits the data, I process it, put what I need in the form and submit it when the page loads to take me to a remote secure site. It works well. <body onload="document.myform.submit()"> <form name="myform" ... > <input type="hidden" ... /> <input type="hidden" ... /> </form> .. .. .. </body> -- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp "Victor" <bl***@blank.com> wrote in message Additional info - the POST is to a page that I do not control (it's onnews:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... > I need to redirect to another web page, but that redirect will include the > submission of form data. So, unlike ServerXMLHTTP which stays on the > originating web page, I need the script to redirect to the page that I'm > submitting the POST data to (without pressing a submit button). > > Any suggestions? > > Thanks, > > Victor another website). Is there a component that will let me do the equivalent of a Response.Redirect to another website while setting headers? Victor
Show quote
"Victor" wrote in message news:uCoCxMrGFHA.3376@TK2MSFTNGP14.phx.gbl... Victor...: : "Victor" <bl***@blank.com> wrote in message : news:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... : > I need to redirect to another web page, but that redirect will include the : > submission of form data. So, unlike ServerXMLHTTP which stays on the : > originating web page, I need the script to redirect to the page that I'm : > submitting the POST data to (without pressing a submit button). : > : > Any suggestions? : > : > Thanks, : > : > Victor : : Additional info - the POST is to a page that I do not control (it's on : another website). : : Is there a component that will let me do the equivalent of a : Response.Redirect to another website while setting headers? If you're trying to post to a page you do not control and then try to control what happens next, then you should be talking with the webmaster of that site. -- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp
Show quote
"Roland Hall" <nobody@nowhere> wrote in message It's a shopping cart, and the webmaster says that as long as it's properlynews:uXxL7iuGFHA.3504@TK2MSFTNGP10.phx.gbl... > "Victor" wrote in message news:uCoCxMrGFHA.3376@TK2MSFTNGP14.phx.gbl... > : > : "Victor" <bl***@blank.com> wrote in message > : news:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... > : > I need to redirect to another web page, but that redirect will include > the > : > submission of form data. So, unlike ServerXMLHTTP which stays on the > : > originating web page, I need the script to redirect to the page that I'm > : > submitting the POST data to (without pressing a submit button). > : > > : > Any suggestions? > : > > : > Thanks, > : > > : > Victor > : > : Additional info - the POST is to a page that I do not control (it's on > : another website). > : > : Is there a component that will let me do the equivalent of a > : Response.Redirect to another website while setting headers? > > Victor... > > If you're trying to post to a page you do not control and then try to > control what happens next, then you should be talking with the webmaster of > that site. formatted, they don't care. What I'm doing is providing a special page with a discount of my product for select people. What I want to avoid is people copying my form HTML, and then posting it on another website and give others an unauthorized discount. The shopping cart people say they can not block a properly formatted POST. So, it's up to me to protect my form code. Understand? So generate a unique value in the database *when* the special page is loaded
on your server, and place it as a hidden input on your form. If the value has already been used or is otherwise not in your database when the form is posted, then you can assume the post came from outside. A On 2/27/05 9:40 PM, in article eOUiv8THFHA.4***@TK2MSFTNGP12.phx.gbl, Show quote "Victor" <bl***@blank.com> wrote: > > "Roland Hall" <nobody@nowhere> wrote in message > news:uXxL7iuGFHA.3504@TK2MSFTNGP10.phx.gbl... >> "Victor" wrote in message news:uCoCxMrGFHA.3376@TK2MSFTNGP14.phx.gbl... >> : >> : "Victor" <bl***@blank.com> wrote in message >> : news:OuT74ziGFHA.2592@TK2MSFTNGP10.phx.gbl... >> : > I need to redirect to another web page, but that redirect will include >> the >> : > submission of form data. So, unlike ServerXMLHTTP which stays on the >> : > originating web page, I need the script to redirect to the page that > I'm >> : > submitting the POST data to (without pressing a submit button). >> : > >> : > Any suggestions? >> : > >> : > Thanks, >> : > >> : > Victor >> : >> : Additional info - the POST is to a page that I do not control (it's on >> : another website). >> : >> : Is there a component that will let me do the equivalent of a >> : Response.Redirect to another website while setting headers? >> >> Victor... >> >> If you're trying to post to a page you do not control and then try to >> control what happens next, then you should be talking with the webmaster > of >> that site. > > It's a shopping cart, and the webmaster says that as long as it's properly > formatted, they don't care. > > What I'm doing is providing a special page with a discount of my product for > select people. What I want to avoid is people copying my form HTML, and then > posting it on another website and give others an unauthorized discount. > > The shopping cart people say they can not block a properly formatted POST. > So, it's up to me to protect my form code. Understand? > > > > > > > |
|||||||||||||||||||||||