I have menu that is included and many other modules (leftside, rightside, content ect.).
I want to load some PHP page to specific place (content) on link click.
Asked
Active
Viewed 53 times
-3

Sasa Jovic
- 33
- 1
- 10
-
1Can you show us some code? What have you tried? – Marten May 28 '14 at 12:23
1 Answers
-2
Use Ajax on button click and then fill the div in with the php from the ajax response.
function dispRecords()
{
if (window.XMLHttpRequest)
{
// Create the object for browsers
xmlhttp=new XMLHttpRequest();
}
else
{
// Create the object for browser versions prior to IE 7
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
// if server is ready with the response
if (xmlhttp.readyState==4)
{
// if everything is Ok on browser
if(xmlhttp.status==200)
{
//Update the div with the response
document.getElementById("YOURDIV").innerHTML=xmlhttp.responseText;
}
}
}
//send the selected option id to the php page
xmlhttp.open("GET","YOURPHP.php",true);
xmlhttp.send();
}

Soumil Deshpande
- 1,622
- 12
- 14
-
-
xmlhttp.open("GET","YOURPHP.php?PARAM1=VALUE&PARAM2=VALUE",true); – Soumil Deshpande May 29 '14 at 05:19