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 <p id="editme2">Click me to edit this nice long text.</p> <script type="text/javascript"> new Ajax.InPlaceEditor(''editme2'', ''/demoajaxreturn.html'', {rows: 15,cols:40}, { callback: function(form, value) { return ''item=123&field=description&myparam=''+escape(value) } }); </script> Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
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 > <p id="editme2">Click me to edit this nice long text.</p> > <script type="text/javascript"> > new Ajax.InPlaceEditor(''editme2'', ''/demoajaxreturn.html'', {rows: > 15,cols:40}, { > callback: function(form, value) { return > ''item=123&field=description&myparam=''+escape(value) } > }); > </script> > > Thanks! > > >-- "Reality is that which, when you stop believing in it, doesn''t go away." - Philip K. Dick, American Writer --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I should have been more clear, I''m using PHP for the page itself, although the question doesn''t relate to PHP It''s just an issue I had with scriptalicious, and came here from their website. On Jun 6, 1:28 am, "Yu-Shan Fung" <ambivale...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 <maxsilver5...-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 > > <p id="editme2">Click me to edit this nice long text.</p> > > <script type="text/javascript"> > > new Ajax.InPlaceEditor(''editme2'', ''/demoajaxreturn.html'', {rows: > > 15,cols:40}, { > > callback: function(form, value) { return > > ''item=123&field=description&myparam=''+escape(value) } > > }); > > </script> > > > Thanks! > > -- > "Reality is that which, when you stop believing in it, doesn''t go away." > - Philip K. Dick, American Writer--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---