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.
Parker T. (Guest)
on 2006-02-07 21: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 T.
http://www.parkert.com/
510.541.0125
Damian L. (Guest)
on 2006-04-20 23:26
sorry to bump,

any joy with this?

Parker T. 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 T.
> http://www.parkert.com/
> 510.541.0125
Rob M. (Guest)
on 2006-04-21 11: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
Damian L. (Guest)
on 2006-04-21 15:06
Thanks Rob

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

Damian

Rob M. 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.