How can I script a page to POST to a ASP page without having a response sent back to the originating page?
ok, dumb example:
User clicks on a link/button/whatever that sends some values by post/get/whatever to another asp page for processing, and does not expect a response from that asp while maintaining the current page in view without reloading.
I say "without reloading" because I know I can POST to self to maintain my current page, but what if I can't do that because I already have values on that page that I need to maintain and reloading will reset them.
Is the simple answer that silent POSTs cannot be done and I will have to carry over my existing value and post to self to achieve this?
posting to a blank page is your answer, then last line on your blank page would redirect to some other page.
For example: When you add a post to this forum, on submit the information is sent to a blank page(no html present), processed, then you are sent back to the forum that you have posted in. If you are just needing to preserve the information and display the same page that the user submited then you can use this example i have posted in this thread:
By POSTing to a blank page, I'm assuming you are talking about a ASP page that is strictly server-side with no writes to the client's browser page. If so, I understand what you mean. However my goal was to prevent changing the browser's location, without having the need to redirect back.
So basically, If I send a POST to a ASP page, I will have to redirect back to where I started from; I cannot send and maintain the current page's location.
yes your correct on both querries. Posting to a server-side only page and once processed redirect back to the page you came from or redirect to another page is what i was meaning.
Of course you can post the page to itself and process then page and then display the same page again with all the values preserved, if that what you need. What you can't do is submit the form and not travel back to the server for processing.
Ok. That answers a lot. Thanks.
Are you familar with Authorize.Net or PlanetPayment.com ?
Their merchant website can be configured to send a response page to the payer as well as a "silent POST" who no one sees, which is more for back-end processessing. This is actually similar to what I was trying to achieve.
Nope. No emailing involved. Just a "Thanks for payment" kind of simple page that also has their response codes if the payment was successful or not. And for security reasons, this page that the payer sees is not the actual page (e.g. activating an online account after payment), but rather through their "silent POST" they're able to do the "activation", like a db update or something along those lines.
Sorry for fussing about but I am still not sure what it is you are looking for.
What payment method are you using?
On one of my client’s sites which include online payments I have linked into the worldpay system for processing credit card payments. What happens here is the user fills the shopping cart in the web site. When the user is finished and submits the order they are sent to the worldpay payment page which uses SSL 128bit encryption and is asked to provide credit card details etc. The page i have customised to look exactly like the clients web site. On submit of this payment page the credit card is check for validation etc. and then is redirected back into my clients site, and any details my client needs are stored in the database. All this happens within the same window; it appears to the majority of users that they have not even left the site.
Do you just need to take details from a form, process the details and then display a thank you page?
What do you mean by response codes?
How is the payment being processed?
Ok, I think I knwo what you mean. What the payment gateways do can be achieved easily in PHP/Cold Fusion and I think with an extension in ASP.
Basically the page that is called on the payment server does a call to your script (the silent post) for authorization then sends a response to the client. In the 'silent post' the server is acting a s a client to call another page, either on the same server or a different server.
However, although this is done behind the scenes, this is still in response to a request by the user and at the end there is still a page returned to the user, so they have a slight advantage compared to what you are trying to do, where you say you want the browser not to get any response?
An easy way we found at our company to process incoming information from the users, without changing the contents of the page they have visited, is to send as a reply the status code 204. In RFC2616 it is referred as the "No Content" response.
We use CGI applications made by Delphi V7 and TWebResponse tool. However, I am sure that other languages will also have similar tools to perform the same task.