Displaying the AJAX content in a separate window

Write the following piece of code in your call back function to display the AJAX content in a separate browser window.
function(data) {
var myWindow = window.open('','Name of the Window','');

myWindow.document.open();
myWindow.document.write(data);
myWindow.document.close();
}

Note: You need to make sure your browser pop up blocker has disabled.

No comments:

Post a Comment

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...