HI, I am a new to the group. I have run into the following issue. The following works fine <h1 id="tobeedited">To be edited</h1> <script> new Ajax.InPlaceEditor($(''tobeedited''), ''_ajax_inplaceeditor_result.html'', { ajaxOptions: {method: ''get''} }); </script> But I want to pass some more parameters. So I did the following: <h1 id="tobeedited">To be edited</h1> <script> new Ajax.InPlaceEditor($(''tobeedited''), ''_ajax_inplaceeditor_result.html'', { ajaxOptions: {method: ''get'',parameters:''id=5''} }); </script> However, the ''value'' created by the InPlace Editor does not get passed. I think I understand why this is, but is there a workaround or better usage? Deco
How about something like this? Adding a callback... Hope this helps! Thank you, Mandy. <h1 id="tobeedited">To be edited</h1> <s*ript> new Ajax.InPlaceEditor($(''tobeedited''), ''_ajax_inplaceeditor_result.html'', { ajaxOptions: {method: ''get''}, callback: function(form, value) { return ''id=5&value='' + value}, }); </s*ript>
Thanks, I may try this. I merely added it to the url for simplicity since I have to add my session information anyway. I just thought that I was missing it somewhere, since it must be a common problem. Deco On Jan 9, 2006, at 12:03 AM, Maninder, Singh wrote:> How about something like this? > > Adding a callback... > > Hope this helps! > > Thank you, > Mandy. > > <h1 id="tobeedited">To be edited</h1> > > <s*ript> > new Ajax.InPlaceEditor($(''tobeedited''), > ''_ajax_inplaceeditor_result.html'', { > ajaxOptions: {method: ''get''}, > callback: function(form, value) { return ''id=5&value='' + > value}, > }); > </s*ript> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Maybe you can help. The call back function is after returning from the server. I want to sent more values to the server. Or is this a prototype thing? Deco On Jan 9, 2006, at 12:03 AM, Maninder, Singh wrote:> How about something like this? > > Adding a callback... > > Hope this helps! > > Thank you, > Mandy. > > <h1 id="tobeedited">To be edited</h1> > > <s*ript> > new Ajax.InPlaceEditor($(''tobeedited''), > ''_ajax_inplaceeditor_result.html'', { > ajaxOptions: {method: ''get''}, > callback: function(form, value) { return ''id=5&value='' + > value}, > }); > </s*ript> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>> The call back function is after returning from the server.callback V1.5 function(form) {Form.serialize(form)} A function that will get executed just before the request is sent to the server, should return the parameters to be sent in the URL. Will get two parameters, the entire form and the value of the text control. Actually you are not correct. Check the documentation for callback above. This should work for you. Thank you, Mandy.
Thanks, I will try this out. Where is this documentation? The only problem may be that the values are not all in a form. Deco On Jan 9, 2006, at 1:30 AM, Maninder, Singh wrote:>>> The call back function is after returning from the server. > > callback > V1.5 > function(form) {Form.serialize(form)} > A function that will get executed just before the request is sent > to the server, > should return the parameters to be sent in the URL. Will get two > parameters, > the entire form and the value of the text control. > > Actually you are not correct. Check the documentation for callback > above. > This should work for you. > > Thank you, > Mandy. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Here you go: http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs