JavaScript Library Example

This JavaScript library example shows the use of the XhrWindow library.

Parent page

This is the parent page. When you click the Start button on this page you should be able to see a modal window that uses the XmlHttpRequest object to retrieve the xhrwindow-child-page-a.htm document. The xhrwindow-child-page-a.htm document contains a form that will post to xhrwindow-child-page-b.htm, and so on until xhrwindow-child-page-d.htm posts to xhrwindow-child-page-e.htm, a non-existent document. This will return a 404 error, which is handled by the XhrWindow object. Clicking the Cancel button in the modal window on pages A through D will trigger the onCancel event. If you submit Page D, the error event will fire and will display the 404 error and will close the modal window after the timeout has elapsed.