3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by MCDeveloper
0

>I need to refresh one div in my HTML page and not the entire page, is this possible?

Yes it is possible. Read more about AJAX.

0

Hi,
I need to refresh one div in my HTML page and not the entire page, is this possible? Please help

Hi, did you get this figured out? I have a trick I use with some Javascript if you are interested.
Are we allowed to post script/code here?

0

Are we allowed to post script/code here?

Yes, you can post code here but your code must be encased with code-tags. Read more about code-tags.

Edited by mike_2000_17: Fixed formatting

1
function CloseDiv()
        {
            window.setTimeout("Hide();", 1000);
        }
        function Hide()
        {
            var dv = document.getElementById("DivIdName") ;
            dv.style.visibility = "hidden";
        }
		
        function OpenDiv()
        {
            window.setTimeout("Show();", 1);
        }
        function Show()
        {
            var dv = document.getElementById("DivIdName") ;
            dv.style.visibility = "visible";
        }

Once I have submitted a form the div shows the response i need. That response has in it a form with the onclick CloseDiv and in a second the div is closed. You can change the amount of seconds to your liking.
But now you have to use the OpenDiv function to reopen it later on the form or link that Opened it in the first place.
I hope this make sense. If not just ask any questions may have.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.