troubleshooting Question

form submit not working when using .load

Avatar of KCTechNet
KCTechNetFlag for United States of America asked on
15 Comments1 Solution534 ViewsLast Modified:
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:
    function addAppt(apptDate)
        $("#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.
Join our community to see this answer!
Unlock 1 Answer and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros