I have a php form that works fine when I open it directly. The submit button will add records to several tables as needed (using MySQL).
But when I load the page into a div on another page, clicking the submit button does not add the records.
One the main page I have:
$("#detailSection").load("newAppointment.php?apptDate=" + apptDate);
When the form loads in the div, it is properly putting the value apptDate into the Appointment field in the form. So it seems to be loading fine. It is just the code behind the submit button (which is in newAppointment.php) does not run.
The reason I am using jquery instead of a php include is because there are a couple different forms that I need to switch between depending on what the user clicks on the main page, and they are all going into the "detailSection" div.