HTTP Redirect with POST

V

Vinod

Victor said:
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
 
V

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
 
R

Roland Hall

in message :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
 
V

Victor

Curt_C said:
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
 
V

Victor

Victor said:
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
 
R

Roland Hall

in message :
: : > 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
 
V

Victor

Roland Hall said:
in message :
: : > 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?
 
A

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
 

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,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top