I have a page with frames. In one frame a user's action can cause an ajax request to be sent. The response contains a complete new page and I want to replace the existing page with the response. My problem is that when I try and do that the new content is rendered within the frame the request originated from. How can I replace the entire page and not just the frame?
I've tried:
document.open();
document.write(response);
document.close();
and:
var newDoc = document.open("text/html", "replace");
newDoc.write(response);
newDoc.close();
But I got the same undesirable results from both.