By integrating any custom pop-up window into the Ajax application, you are essentially creating a window that aids in the application's functionality or navigation. From this point on, when I refer to a navigation window, I am talking about the pop-up window that was developed to integrate with the application as opposed to the browser's alert box and its siblings. You can use navigation windows for more than just alerting the user to some text, or prompting the user for an OK or cancel command. We can use our custom navigation window to present an associating form to the user, or additional information as requested by her.
By using our custom navigation window, we have full reign over what roles the user wants the navigation window to take. Besides replacing the browser's alert, prompt, and confirm windows, the developer can present any kind of data to the user in a window that is certain to require her attention.
You can place in the
innerHTML property of the window's
<div> element any content
that the application needs to add to a navigation window. For
$('popupContainer').innerHTML = 'This is the new content to be displayed in the navigation window.';
This makes it easy for a developer to insert content that has been passed from the server using an Ajax request.
Whether the developer wants to use the
responseText property or the
responseXML property of the Ajax response is a matter of choice. I already showed you how to import ...