I'm working on a web application and for the first time I'm using Ajax. The problem I encouter is that when requesting a php file I get a fatal error because all the includes that I have done in my index.php file are not longer known in my requested file.
my form.php => form.js
$myClass = new cMyClass();
When calling the actionhandle through my index file then cMyClass is known, but calling the actionhandle file directly with ajax then the class is not known.
Is there a solution for this problem?
I already tried calling the index file from ajax but then my requestText is not what I want. I get my complete DOM structure as requestText.
Thank you in advance.