Forum: Ruby on Rails in place edit, save on blur

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
19c9af375aca3001e3978cb16684803c?d=identicon&s=25 Parker Thompson (Guest)
on 2006-02-07 20:41
(Received via mailing list)
I thought I'd seen some discussion on this, but can't find it.  I have
a text area that I'd like to save on blur unless the user clicks
cancel.  Anyone got a nice example of this?  It's non-obvious to me
how I force the submit via javascript.  Thanks,

pt.
--
Parker Thompson
http://www.parkert.com/
510.541.0125
65c7c3dd95869e1430a260b049eabd51?d=identicon&s=25 Damian Legassick (dlg)
on 2006-04-20 21:26
sorry to bump,

any joy with this?

Parker Thompson wrote:
> I thought I'd seen some discussion on this, but can't find it.  I have
> a text area that I'd like to save on blur unless the user clicks
> cancel.  Anyone got a nice example of this?  It's non-obvious to me
> how I force the submit via javascript.  Thanks,
>
> pt.
> --
> Parker Thompson
> http://www.parkert.com/
> 510.541.0125
A4a8fefcbd2cd6d2370609a5e2a3a389?d=identicon&s=25 Rob Merrell (Guest)
on 2006-04-21 09:53
(Received via mailing list)
Parker,

have you tried using onBlur in the text area?

<%= text_area_tag "my_text", "content", :onBlur => "
document.form_name.submit();" %>

Rob
65c7c3dd95869e1430a260b049eabd51?d=identicon&s=25 Damian Legassick (dlg)
on 2006-04-21 13:06
Thanks Rob

this works for me, my mistake was using the wrong syntax to name the
form element

Damian

Rob Merrell wrote:
> Parker,
>
> have you tried using onBlur in the text area?
>
> <%= text_area_tag "my_text", "content", :onBlur => "
> document.form_name.submit();" %>
>
> Rob
This topic is locked and can not be replied to.