472,353 Members | 1,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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 4781
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tim Wade | last post by:
Does anyone have any ideas on how to do an automatic html form post using hidden fields without introducing client-side script nor using a...
1
by: dave | last post by:
Hello I have one simple form (myform.asp) and it posts to query.asp I had put below code in both file on top of the page to redirect this two...
3
by: Jed | last post by:
I have written an HttpHandler which I invoke through an ashx page. The HttpHandler does various things to process the request, then it is supposed...
8
by: Andreas Klemt | last post by:
Hello, I get this error Message "cannot redirect after http headers have been sent" when I do this response.redirect ("home.aspx") How can I...
6
by: Nick Horrocks | last post by:
I have set up a custom error page for 404 errors. However the HTTP status code returned is 302 followed by 200, this causes search engines not to...
1
by: David | last post by:
I need to redirect to a page and HTTP Post data. The Response.Redirect does not work and the HTTPREQUEST option calls the page and waits for a...
5
by: Tyler | last post by:
I am developing an application which will allow me to automatically sign into an external website. I can currently do a screen scrape using...
0
by: Wayne Deleersnyder | last post by:
Hi All, I'm hoping to try to solve this error. I'm currently putting together a little web app, but I need it to work under both IE6, IE7,...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.