469,898 Members | 1,581 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

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

Jul 22 '05 #1
8 4680
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
"Victor" <bl***@blank.com> wrote in message
news:Ou**************@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

Jul 22 '05 #2
"Victor" wrote in message news:Ou**************@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
Jul 22 '05 #3

"Victor" <bl***@blank.com> wrote in message
news:Ou**************@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

Jul 22 '05 #4
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@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


--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Victor" <bl***@blank.com> wrote in message
news:Ou**************@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


Jul 22 '05 #5

"Victor" <bl***@blank.com> wrote in message
news:Ou**************@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

Jul 22 '05 #6
"Victor" wrote in message news:uC**************@TK2MSFTNGP14.phx.gbl...
:
: "Victor" <bl***@blank.com> wrote in message
: news:Ou**************@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
Jul 22 '05 #7

"Roland Hall" <nobody@nowhere> wrote in message
news:uX**************@TK2MSFTNGP10.phx.gbl...
"Victor" wrote in message news:uC**************@TK2MSFTNGP14.phx.gbl...
:
: "Victor" <bl***@blank.com> wrote in message
: news:Ou**************@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?



Jul 22 '05 #8
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 eO**************@TK2MSFTNGP12.phx.gbl,
"Victor" <bl***@blank.com> wrote:

"Roland Hall" <nobody@nowhere> wrote in message
news:uX**************@TK2MSFTNGP10.phx.gbl...
"Victor" wrote in message news:uC**************@TK2MSFTNGP14.phx.gbl...
:
: "Victor" <bl***@blank.com> wrote in message
: news:Ou**************@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?



Jul 22 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Tim Wade | last post: by
1 post views Thread by dave | last post: by
3 posts views Thread by Jed | last post: by
8 posts views Thread by Andreas Klemt | last post: by
6 posts views Thread by Nick Horrocks | last post: by
1 post views Thread by David | last post: by
5 posts views Thread by Tyler | last post: by
reply views Thread by Wayne Deleersnyder | last post: by
56 posts views Thread by UKuser | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.