I have a folder 'js' with the jQuery function and the PHP script. In another folder I have the HTML file. So this is the structure by now:
/server/js/global.js
/server/js/script.php
/server/html/student.html
The JavaScript code is called from HTML and its working fine, but the jQuery post function doesn't call the PHP script.
If I move the HTML file into the 'js' folder it works perfectly and the PHP script is called fine.
Why does this happens?
I mean: What is the path represented on the next path?
$.post('script.php',...);
Is it calling a file from the JavaScript folder or from the HTML folder?