Re: Other parameters on InPlaceEditor

Christophe Porteneuve
Wed, 11 Jul 2007 07:54:44 -0000

Hey,

a.alonzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org a écrit
:
>   callback: function(form, value) { return
''op=pag_sca&id='' + id_pagam
> +
''&id_cliente=<?=$id_user?>&id_order=<?=$_REQUEST[''id'']?>''},

Where in that function do you use either form or value?  The names of
the arguments in your URL are too confuse for me to make sense out of it
anyway, but what I can say is: the string you''re returning here is
fairly fixed.

Where does this id_pagam var come from?  Something in the outer scopes?
Here''s a rewrite that would add a "value" parameter with the
form''s
value, and URL-encode any text value, if necessary, as it goes:

   callback: function(form, value) {
     var params = {
       op: ''pag_sca'', id: id_pagam,
       id_cliente: ''<?= $id_user ?>'',
       id_order: ''<?= $_REQUEST[''id'']
?>'',
       value: value
     };
     return Hash.toQueryString(params);
   }