Replace HTML page with contents retrieved via AJAX

The simplest way is to set the new HTML content using:

document.open();
document.write(newContent);
document.close();

Leave a Comment