-3

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.

Sasa Jovic
  • 33
  • 1
  • 10

1 Answers1

-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