sandy1028 Posted September 18, 2008 Share Posted September 18, 2008 Hi, I have the code below which i have named it as ex1.php <html> <head> <TITLE> About Us </TITLE> </head> <body leftMargin=0 topMargin=0> <script type="text/javascript"> function Ajax(){ var xmlHttp; try{ xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari } catch (e){ try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer } catch (e) { try{ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("No AJAX!?"); return false; } } } xmlHttp.onreadystatechange=function(){ if(xmlHttp.readyState==4){ document.getElementById('ReloadThis').innerHTML=xmlHttp.responseText; setTimeout('Ajax()',1); } } [b]xmlHttp.open("GET","./ex1.php",true);[/b] xmlHttp.send(null); } window.onload=function(){ setTimeout('Ajax()',1); } </script> <div id="ReloadThis" style ="position:absolute; left:30px; width:900px; top:100px; background-color: #FfFfFF"><font size = 3 color="#003366" face = "Times new roman"> <p align = "center"><font size=4 color=#006699><b>ABOUT US</b></font></p> </div> </body> </html> /code] When I use ex1.php, the page keeps loading. How to avoid it. When I change the code without refreshing manully how to auto refresh it. Please help me Link to comment https://forums.phpfreaks.com/topic/124791-the-reload-keeps-reloading/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.