zimmy52420 Posted October 25, 2006 Share Posted October 25, 2006 Is there any way I can refresh only the contents of a DIV within one of my pages?Thanks in advance(Every time I get my scripts working, they come up with a new problem. Stupid IE.) Link to comment Share on other sites More sharing options...
jesh Posted October 25, 2006 Share Posted October 25, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now