On 10/27/05, Jon Tirsen <[EMAIL PROTECTED]> wrote:
> This should be possible to do with some heavy hacking of the
> InPlaceEditor. Essentially just strip out the Ajax calls from it and
> instead save the new value in a field.

I'll try that.

> This is a pretty special requirement so I don't think we'll at this
> stage try to support it in the standard implementation.

Really? The use case might not be common but it seems like it should
be easy to design the code so it's supportable. I assume after the
user types something in you'll have that in a variable then execute
the Ajax stuff. Wouldn't it be simple to just short circuit the ajax
call and return the value? Just make it configurable with another
option called "ajax=true" (default mode) .. I'd use that by just
passing in "ajax=false".

Thanks,
--Bill

> On 10/28/05, Bill Lynch <[EMAIL PROTECTED]> wrote:
> > Michael,
> >
> > Thanks, but that's not quite what I was looking for. I want a way do
> > zero ajax calls -- basically, edit the field and get the new value in
> > a variable without hitting the server (I have a blank URL parameter).
> > Is that possible?
> >
> > Thanks,
> > --Bill
> >
> > On 10/27/05, Michael Krog <[EMAIL PROTECTED]> wrote:
> > > Hi Bill.
> > > There should be a getText-value on the editor.
> > >
> > > var field=new Ajax.InPlaceEditor('editme', '', {onComplete:readValue});
> > >
> > > function readValue(){
> > >         alert(field.getText());
> > > }
> > >
> > >
> > >
> > > Bill Lynch wrote:
> > >
> > > >All,
> > > >
> > > >The Ajax.InPlaceEditor control is nice but I'd like the ability to
> > > >read the changed value. Basically, I'm creating a form with editable
> > > >elements but it's only when I do the submit that the form elements are
> > > >submitted. I'd still like to allow in-place editing but what I'd like
> > > >to do is get the new value and throw that in a hidden form variable
> > > >
> > > >Is this possible? I couldn't really see a way to short circuit the
> > > >logic so the ajax communication is bypassed. Perhaps this would work:
> > > >
> > > >new Ajax.InPlaceEditor('editme', '', {variable:'somevar'});
> > > >
> > > >When the user presses "save" then "somevar"'s value is updated.
> > > >
> > > >Thanks,
> > > >--Bill
> > _______________________________________________
> > Rails-spinoffs mailing list
> > [email protected]
> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> >
> _______________________________________________
> Rails-spinoffs mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to