Are you using Rails or some other technology? In Rails you would just
have the id as part of your url, like this:
new Ajax.InPlaceEditor(''element-id'',
''/controller/set_text/123'', {
loadTextURL: ''/controller/get_text/123'' });
If you want it to be part of the query parameters then you need to
specify the callback option like this:
new Ajax.InPlaceEditor(''element-id'',
''/controller/set_text'', {
callback: function(form, value) { ''id=123&value='' + value
},
loadTextURL: ''/controller/get_text?id=123'' });
(''123'' is used as the id in the above examples.)
Hope this helps.
Cheers,
Jon
On 10/8/05, Danijel K. <dani@kafic.net> wrote:> Hi all,
> I was wondering if I could get some help with using Ajax.InPlaceEditor.
> I want to use loadTextURL to get the text, as it says on the bottom of
> the documents ''How to edit server side formatted text (formatted
with
> eg. textile)''. My question is how do I know which inplaceedit
I''ve
> clicked? So that I know which id I need to get the text from in the
> mysql ''the id of the element for example gets picked up by my
function
> that I place in loadTextURL''.
> Then I guess all I have to do is return the text and Ajax.InPlaceEditor
> will put it in the textfield?
>
> thank
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>