Re: Scriptalicious: Ajax Inline Text Editor

Yu-Shan Fung
Fri, 06 Jun 2008 05:28:19 -0000

i haven''t used the javascript directly, but you shouldn''t have
to.
Assuming you''re on Rails 2.0+, there''s a plugin for in-place
editing:

http://svn.rubyonrails.org/rails//plugins/in_place_editing/


For usage, see:

http://svn.rubyonrails.org/rails//plugins/in_place_editing/README

and the two .rb files in lib/



On Thu, Jun 5, 2008 at 7:47 PM, Maxsilver
<maxsilver5721-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>
> Hi, I''m just starting out with Scriptalicious + Prototype, and
I''ve
> run into a problem.
>
> I''m trying to create an Ajax.InPlaceEditor that combines the
custom
> size textbox, and the custom parameter (from the examples in the
> scriptalicious documentation)
> http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor
>
> I''ve tried a couple different methods (one of which is listed
below)
> but I can''t seem to get them to work. Sometimes the browser runs
the
> javascript, and ignores the size portion, and sometimes it just doesnt
> run it at all (jscript error on page)
>
> What am I doing wrong?
>
>
> // using (row 15, col 40) for custom size, and custom parameters in
> the same inline editor
> Click me to edit this nice long
text.
>
>  new Ajax.InPlaceEditor(''editme2'',
''/demoajaxreturn.html'', {rows:
> 15,cols:40}, {
> callback: function(form, value) { return
>
''item=123&field=description&myparam=''+escape(value) }
> });
>
>
> Thanks!
> >
>


--
"Reality is that which, when you stop believing in it, doesn''t go
away."
- Philip K. Dick, American Writer