Need ajax on Contao tutorial
Hi,
I couldn't find any answer to this question on the documentation nor the forum :
how can I call a php script that is located in the templates folder via ajax (jquery) ?
To be more precise, I have a js file which contains some jquery functions that get data from a php script. The path to the php script is hard coded in the js file, but then I cannot execute it (rights on the template folder). I could move the script to another folder (like plugins) but it's not safe since it can be run by anyone.
I'm a bit lost, thank you for your help
Aïda
Re: Need ajax on Contao tutorial
Is this not the same question you asked last week? I've posted an answer there today ;)
viewtopic.php?f=6&t=2441
Re: Need ajax on Contao tutorial
Thank you Vera, but I would like to know as well how to deal with the whole ajax process : should I put the javascript file in a module or a template or whatever contao thing so that it can call the php script using insert-tags ? If not, what is the right process to follow in order to set up a safe ajax communication ?
Re: Need ajax on Contao tutorial
I don't know. I guess you could make sure in the calling page that the script won';t even fire if noone is logged in...