dcsimg
www.webdeveloper.com
Results 1 to 15 of 15

Thread: Silent POST

  1. #1
    Join Date
    Feb 2003
    Location
    NYC
    Posts
    8

    Question Silent POST

    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?

    Thanks.

  2. #2
    Join Date
    Feb 2003
    Location
    Derby, UK
    Posts
    456
    You could use a hidden frame or post to a new window which then closes itself (similar principle).

  3. #3
    Join Date
    Feb 2003
    Location
    NYC
    Posts
    8
    Thanks DaiWelsh. True. Opening and closing a popup for this purpose did cross my mind; effective, by not exactly clean, same with hidden frames.

  4. #4
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    hi,
    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:


    http://forums.webdeveloper.com/showt...&threadid=4822

    Hope this helps

  5. #5
    Join Date
    Feb 2003
    Location
    NYC
    Posts
    8
    Thanks Ribeyed.

    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.

    Thanks again.

  6. #6
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    hi,
    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.

  7. #7
    Join Date
    Feb 2003
    Location
    NYC
    Posts
    8
    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.
    Thanks again.

  8. #8
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    hi,
    do you mean the repsonse to the payer is an HTML email?

  9. #9
    Join Date
    Feb 2003
    Location
    NYC
    Posts
    8
    Hi.
    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.

  10. #10
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    hi,
    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?

  11. #11
    Join Date
    Feb 2003
    Location
    Derby, UK
    Posts
    456
    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?

  12. #12
    Join Date
    Feb 2003
    Location
    NYC
    Posts
    8
    DaiWelsh, you got it. That is exactly what I am trying to do. So this is possible with some ASP extension? Is it downloadable somewhere?

    So what you are saying is if a server does a 'silent post', it will be in addition to a normal response?

    Thanks.

  13. #13
    celebguy_dv Guest

  14. #14
    celebguy_dv Guest

  15. #15
    Join Date
    Oct 2006
    Posts
    1

    Silent Post

    Hi oilfriedghost,

    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.

    I hope this might help you a bit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles