Ajax my friend. Give the div an id, <div
id="nameDiv"></div>
then have some javascript in the <head> tag that looks
like this:
<script language="javascript">
<!--
function createObject(){
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet
Explorer"){
ro = new
ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
var http=createObject();
function makefile(includePage) {
http.open('get', includePage);
http.onreadystatechange = handleConts;
http.send(null);
}
function handleConts() {
if(http.readyState == 4){
var response = jim.responseText;
document.getElementById("nameDiv").innerHTML=res
ponse;
}
}
//-->
</script>
To use this just have a link that looks like this:
<a
href="javascript:makefile('include.inc')">P
age name</a>
just change include.inc and the name of the DIV to whatever
you have it
set... FYI this will work with any file name you put into
makefile...
and if you want you can use onload things to make it load on
the beginning
Beshoo wrote:
> hi gaiz :::
>
> i have devision <div></div> how i can
include inside it apage ????? so
> the page will not get refresh !!!
>
> thanx in advance !!
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP-Masters" group.
To post to this group, send email to PHP-Masters googlegroups.com
To unsubscribe from this group, send email to
PHP-Masters-unsubscribe googlegroups.com
For more options, visit this group at http://gro
ups.google.com/group/PHP-Masters
-~----------~----~----~----~------~----~------~--~---
|