How to call php script from php file which is loaded in another php file

I have 1 Web page which includes company's various processing steps. By clicking on any Button it will open same which have some tabs. Now 1 tab is for form according to process. I can load the form according to process in div. But my problem is the form which is loaded in div is not calling another php scripts on load and onClick.

My First Screen Where all the Processes are available(Buttons)

<script>
function locateProductArrival()
{
 location.href = "dailymain.php";
 var input = "ProductArrival";
 localStorage.setItem("kash",input);
}
function locateLineUp()
{
 location.href = "dailymain.php";
 var input = "LineUp";
 localStorage.setItem("kash",input);
} 
</script>

Now It will go to another page which have some tabs and div where i want load data

function Service() {
var xhttp; 

xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
  document.getElementById("main").innerHTML = this.responseText;
}
};
var input = localStorage.getItem("kash");
if(input == "ProductArrival"){
xhttp.open("GET", "ProductArrivalEntry.php", true);
}else  if(input == "LineUp"){
xhttp.open("GET", "LineUpEntry.php", true);
}
xhttp.send();   
}

Both this php files are loading when clicking on Service Tab

This ProductArrivalEntry and LineUpEntry also have to call another script to load some data and insert data. Both this script not calling when i am loading inside another php.