View Full Version : loading a page in a div
vicks
02-19-2008, 09:37 PM
hello
i have a .php file(together with its javascript) that i would like to load in a div tag without refreshing the whole page.. anyone have an idea how to do that..
shyam
02-19-2008, 10:00 PM
go over to the ajax forum...and before that search the web for ajax tutorials
rnd me
02-20-2008, 01:44 PM
<div id="myDiv"></div>
<script>
//Tiny version: synch gets url as string: 168 bytes. by dandavis
function IOStr(U){
X=((!window.XMLHttpRequest)?new ActiveXObject('Microsoft.XMLHTTP'):new XMLHttpRequest);
X.open('GET',U,!!0);
X.send('');
return X.responseText+"\n\n"+X.status;
}
document.getElementById("myDiv").innerHTML= IO(".");
</script>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.