[symfony-users] Jquery and AJAX symfony 1.4

2010-04-19 Thread trankh
Hello, I want to call a simple action without passing any argument inside a jquery function. No argument because a random function is called inside the action. The routing (in input and output) is this: plantyourtree: url: /tree/plantyourtree param: { module: tree, action: new } the js

Re: [symfony-users] Jquery and AJAX symfony 1.4

2010-04-19 Thread Welington Veiga
Well, it's very easy, use ajax like a single php file. View: Use a the helper ?php echo url_for('YOUR_MODULE/index'); ? to decide for what URL to send, inside your script tag, assign to a javascript variable Controller (action) $this-getResponse()-setHttpHeader('Content-type','text/json');