Results 1 to 4 of 4

Thread: Need ajax on Contao tutorial

  1. #1
    User
    Join Date
    01-26-10.
    Posts
    37

    Default 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

  2. #2
    User
    Join Date
    06-29-09.
    Posts
    271

    Default 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

  3. #3
    User
    Join Date
    01-26-10.
    Posts
    37

    Default 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 ?

  4. #4
    User
    Join Date
    06-29-09.
    Posts
    271

    Default 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...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •