html - How to Call the one php page content and display it another php page using ajax
565
I have index page, in that i have 2 button "Staff Details" and "Student Detalis" When i click "Staff Details" , the content of "staffDetails.php" should display in index.php
Similarly, "STudent details" also
Ajax Function:
function search1()
{ $.ajax({
Type:'GET',
url:'StaffDetails.php',
success:function(html)
{
document.getElementById("StaffDetails").innerHTML=html;
},
})
}
Answer
Solution:
here is a complete ajax function use like this and help full for you in future
here is full ajax working and tested example hope no question left now. Thanks!