Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Dynamic Page Replacing Content Reply To: Dynamic Page Replacing Content

#236821
Shikkediel
Participant

This sounds like something to be approached with Ajax. It can load web content and insert it without refreshing the page. You’d need to add jQuery to the page for that, the most basic form of this behaviour is .load(). Say you have a parent div #parentand an external file called newstuff.html. Then it would be something like :

$('#somebutton').click(function() {

    $('#parent').load('newstuff.html');
});

http://api.jquery.com/load/