$(document).load("somepage.aspx", function (responseText, textStatus, xhr) { });
This does not work.Is there a way to use the download function to replace the entire document, including the head?
EDIT: I don't want to refresh my page, I have to use AJAX.
$.get("somepage.aspx", function (data) { document.open(); document.write(data); document.close(); $.cache = {}; }, "text");
You can use the Jquery Ajax request to grab some html from the server, to remove everything from the document and replace it with content.
iframe .
$(function(){ $.get('my_page.html', function(e){ $(document).empty().append(e); }); });
. my_page.html , jQuery , my_page.html.
, .
$(window).load(function(){ document.href.location = "your_page"; });