Home All Groups Group Topic Archive Search About

HTTP Redirect with POST



Author
24 Feb 2005 4:52 AM
Victor
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

Author
23 Feb 2005 10:27 AM
Vinod
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
>
>
>

Hi,

You can post the data using client side javascript or thru querystrings

Regards
Vinod
Author
24 Feb 2005 5:02 AM
Curt_C [MVP]
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

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


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
>
>
>
Author
24 Feb 2005 8:49 PM
Victor
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%236cbI3iGFHA.3376@TK2MSFTNGP14.phx.gbl...
> 3 options that I can think of.
> 1) use querystring values

For security reasons, it needs to be a POST and not querystring.

> 2) pass the redirect to a clienside FORM.SUBMIT()

This is what I'm considering.... it's javascript and is a small security
compromise, 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
> >
> >
> >
>
>
Author
24 Feb 2005 9:47 AM
Roland Hall
"Victor" 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).

I'm doing the second one Curt mentioned so I can post the data, perform more
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
Author
24 Feb 2005 8:53 PM
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?

Victor
Author
25 Feb 2005 3:18 AM
Roland Hall
Show quote
"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.

--
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
Author
28 Feb 2005 2:40 AM
Victor
Show quote
"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?
Author
28 Feb 2005 2:53 AM
Aaron [SQL Server MVP]
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?
>
>
>
>
>
>
>

AddThis Social Bookmark Button