Hi Christophe,
thank you :-)

I have another doubt.

I have used the callback, but it does not come passed no parameter

the InPlaceEditor function isn't into a form.
Can I use the same one the one which you have advised to me?

the code is:
----------------------------------------------------
 var editor= new Ajax.InPlaceCollectionEditor(el, url,
 {
  ajaxOptions: {method: 'get'},
  value: ($(el).innerHTML=='Yes') ? '1' : '0',
  collection: [[0,'No'],[1,'Yes']],
  callback: function(form, value) { return 'op=pag_sca&id=' + id_pagam
+ '&id_cliente=<?=$id_user?>&id_order=<?=$_REQUEST['id']?>'},
  onBlur: function(request) {Element.show('indicator')}
});
----------------------------------------------------

Thank you,
Antonello







On 10 Lug, 16:43, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
> Hey,
>
> Use the callback option, which works like Ajax.Autocompleter's: you
> specify a function of yours that will take two arguments: the form
> element created for IPE and the editable field's value.  It's in charge
> of returning the serialized parameters.  The default implementation just
> does:
>
>    callback: function(form) { return Form.serialize(form); }
>
> You can use that to bind in your own stuff, like:
>
>    callback: function(form, value) {
>      var data = Form.serialize(form, true);
>      data.merge({ myParam1: value1, myParam2, value2 /*...*/ });
>      return data.toQueryString();
>    }
>
> Or if you're more into serialized forms already (which means you take
> care of URL-encoding yourself, ugh):
>
>    callback: function(form, value) {
>      return Form.serialize(form) + 'myParam1=value1&myParam2=value2';
>    }
>
> (Obviously here, we don't URl-encode anything, but you may need to).
>
> 'HTH
>
> --
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to