EJB design: Ajax - Display third party web content

  1. Ajax - Display third party web content (1 messages)

    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 Wee
  2. 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/