Mixing HTML - AJAX and PHP issue

I have three files that call each other like this:

Main – calls the second file through AJAX
Second – this file contains HTML and also php to return a response to the MAIN file
I also INCLUDE the third file in this second file
Third – calls another file through AJAX (The response works)

The issue is there is not response coming back between the main and second file. When I remove all HTML BODY etc then it works. But then the included thirds file with jquery wont work.

Hi @henk3, when loading a file with AJAX you’ll just get the markup as a raw string; JS inside that markup won’t get executed unless you insert it into the page that made the request.

actually I just figured out that the JSON array im returning also contains the HTML markup on the page and that is throwing an error. Back to the drawing board

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.