Jump to content

Refreshing only part of a page?


zimmy52420

Recommended Posts

If your div has an id:

<div id="RefreshDiv">  <!-- CONTENT --></div>

You can use the HTML DOM to get at the contents (and change the contents) of that div.

var refreshDiv;function Refresh(content){	if(!refreshDiv)	{		refreshDiv = document.getElementById("RefreshDiv");	}	refreshDiv.innerHTML = content;}

If the "content" that you pass that function comes from the page itself, then no problem. If the "content" comes from your server, you'll have to use AJAX.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...