Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Two Actions with one form
- From: mwarden at gmail.com (Matt Warden)
- Subject: [Javascript] Two Actions with one form
- Date: Sun Mar 26 20:36:12 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Novitski wrote: > At 02:05 PM 3/26/2006, Matt Warden wrote: > >> Often you can make a return page from payment sites like paypal. These >> will either post back all the content, or return it to you in the >> query string. You might be able to do this with paypal. I would check >> that first. > > > You can do this, however if something goes wrong before the return page > renders -- either the user cancels the transaction or PayPal fails or > the return page redirect fails for any reason -- then the original > client's system will not know that a transaction attempt has occurred. > > Better, I think, to record the submit attempt and the paypal return > event to get the complete picture, so you can scoop up those customers > who fall through the cracks. This is exactly what I was suggesting. Paypal would return the user to a page on the client's site, hopfully with all the post data as payload on the request, where you may do what you wish with the data. Verisign's payflow product does, and paypal probably does as well. >> Your other option is to submit to the form contents to your CGI with >> something like XMLHTTP/AJAX, and then allow the form to post to >> paypal. > > > I had suggested using an Image object simply because I thought it would > be more backward- and cross-browser compatible than XmlHttpRequest. > Since in this case the goal of calling the CGI script is to send data > and not to receive it, I question the use a technology created to > receive data that only the latest browsers support. Actually, I question your assertion that XMLHTTP/XmlHttpRequest was created to receive data. It is for two-way communication, just as normal http requests are. Additionally, the Image.src hack will work only if limiting oneself to passing get request data is acceptable. And if this is the case, then there's no problem in the first place, as a simple http redirect will do the trick. - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEJ0+irI3LObhzHRMRAjkcAJ4kz7DoYXQV5bLVmiBFGKuqoGjADQCbBTgQ Ib/JLhcdwPA5g7YLbkJyers= =tPpm -----END PGP SIGNATURE-----
- Follow-Ups:
- [Javascript] Two Actions with one form
- From: Paul Novitski
- [Javascript] Two Actions with one form
- References:
- [Javascript] Two Actions with one form
- From: Del Wegener
- [Javascript] Two Actions with one form
- From: Matt Warden
- [Javascript] Two Actions with one form
- From: Paul Novitski
- [Javascript] Two Actions with one form
- Prev by Date: [Javascript] Two Actions with one form
- Next by Date: [Javascript] Two Actions with one form
- Previous by thread: [Javascript] Two Actions with one form
- Next by thread: [Javascript] Two Actions with one form
- Index(es):