-
Ajax - Display third party web content (1 messages)
- Posted by: Tom Brendon
- Posted on: September 02 2009 15:02 EDT
hi, I am currently using an IFrame (in my jsp) to bring up a third party web content(ex.a payment page from www.hsbc.com). i want the external site to handle all the user actions (within the iframe). In this case I am unable to capture the errors or exception that the external website throws. Is there a way to bring up third party web content using Ajax with better error handling mechanism ? FYI : webservices not available Regards WeeThreaded Messages (1)
- Re: Ajax - Display third party web content by Sergei Batiuk on September 24 2009 17:41 EDT
-
Re: Ajax - Display third party web content[ Go to top ]
- Posted by: Sergei Batiuk
- Posted on: September 24 2009 17:41 EDT
- in response to Tom Brendon
If you use XMLHttpRequest to process your requests, and the website you intend to use sends correct HTTP status codes on response that yes, you can do something about it: var xmlhttp = getXmlHttp() // Access the XMLHttpRequest instance; not shown here xmlhttp.open('GET', '/third_party_url.html', false); xmlhttp.send(null); if(xmlhttp.status == 200) { alert(xmlhttp.responseText); } else { // Provide your error handler here } Sergei. Java Development on Demand http://www.hitech.com.ua/en/