# In place edit, save on blur

**URL:** <https://www.ruby-forum.com/t/in-place-edit-save-on-blur/53502>\
**Category:** Rails\
**Created:** [February 7, 2006, 8:41pm UTC](https://www.ruby-forum.com/t/in-place-edit-save-on-blur/53502 "2006-02-07T20:41:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parker\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@Parker\_T](https://www.ruby-forum.com/u/Parker_T)\
**Post date:** [February 7, 2006, 8:41pm UTC](https://www.ruby-forum.com/t/in-place-edit-save-on-blur/53502/1 "2006-02-07T20:41:50Z")

</div>

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/](http://www.parkert.com/)  
510.541.0125

---

<div class="post-metadata">

**Author:** ![Parker\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@Parker\_T](https://www.ruby-forum.com/u/Parker_T)\
**Post date:** [April 20, 2006, 9:26pm UTC](https://www.ruby-forum.com/t/in-place-edit-save-on-blur/53502/2 "2006-04-20T21:26:34Z")

</div>

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/](http://www.parkert.com/)  
> 510.541.0125

---

<div class="post-metadata">

**Author:** ![Parker\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@Parker\_T](https://www.ruby-forum.com/u/Parker_T)\
**Post date:** [April 21, 2006, 9:53am UTC](https://www.ruby-forum.com/t/in-place-edit-save-on-blur/53502/3 "2006-04-21T09:53:19Z")

</div>

Parker,

have you tried using onBlur in the text area?

\<%= text\_area\_tag “my\_text”, “content”, :onBlur =\> "  
document.form\_name.submit();" %\>

Rob

---

<div class="post-metadata">

**Author:** ![Parker\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@Parker\_T](https://www.ruby-forum.com/u/Parker_T)\
**Post date:** [April 21, 2006, 1:06pm UTC](https://www.ruby-forum.com/t/in-place-edit-save-on-blur/53502/4 "2006-04-21T13:06:45Z")

</div>

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
