views:

34

answers:

1

Hi,

I try to give a lot of parameters in a remote_function like this :

<?php 
echo remote_function(array( 'update' => 'test',
                           'url' => 'conges/verifdate',
                           'with' => "'date_deb=' + $('date_debut').value"
                    ));
?>

This code works, in my action.class I can to get the parameter.

But when I try to give a second parameter, it doesn't work :

<?php
    echo remote_function(array( 'update' => 'test',
                           'url' => 'conges/verifdate',
                           'with' => "'date_deb=' + $('date_debut').value"."'+&date_fin=' + $('date_fin')"
                    ))
?>

Why ??

A: 

HI,

I did it like this:

'url' => 'conges/verifdate?vars=serialize(array("var1" => 1, "var2" => 2))'

In your remote action you do:

$vars = unserialize($request->getParameter('vars'));

I hope you can work with this solution.

I saw you I missunderstood your question, maybe this link is helpful: http://onrails.org/articles/2006/05/01/remote_function-with
tigerstyle : I'm working with Symfony and not Ruby
bahamut100