The easiest way to fetch another page and insert it into the DOM is by using load():
$('body').load('page.htm'); injects the contents of page.htm into <body>. You can also use selectors in the url if you only want to fetch parts of the page: $('body').load('page.html #someelement') injects only the element with id 'somelement' from page.htm. Check out the jquery documentation for load() here: http://docs.jquery.com/Ajax/load#urldatacallback Did that answer your question? On Oct 2, 8:41 pm, "Kynn Jones" <[EMAIL PROTECTED]> wrote: > This is the most basic AJAX question. Suppose my script fetches a new page > using $.( 'http://some/url', ... ). I'd now like to replace the currently > displayed page with the newly fetched one. I suppose that I need to make a > new DOM subtree from the downloaded content and replace the subtree > corresponding to the current page with this newly generated subtree... But > I'm not sure of how one does this. > Could someone show me how to do this? (Or point me to an example?) > > TIA! > > Kynn