# "observe\_field" and "onblur"

**URL:** <https://www.ruby-forum.com/t/observe-field-and-onblur/103515>\
**Category:** Rails\
**Created:** [May 7, 2007, 2:14pm UTC](https://www.ruby-forum.com/t/observe-field-and-onblur/103515 "2007-05-07T14:14:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier\_CH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c57346/32.png) [@Javier\_CH](https://www.ruby-forum.com/u/Javier_CH)\
**Post date:** [May 7, 2007, 2:14pm UTC](https://www.ruby-forum.com/t/observe-field-and-onblur/103515/1 "2007-05-07T14:14:01Z")

</div>

I’ve a text\_field\_tag (dom-id: tag) in a form (http://  
[pastie.textmate.org/59525](http://pastie.textmate.org/59525)). Now I’d like it to have this kind ob  
behaviour:

The user types in some stuff and as soon as he hits the tabulator-key  
some fancy javascript/ajax stuff happens before the cursor jumps to  
the next text\_field\_tag.

I assumed this would be done using an observe\_field-method with the  
value “blur” on the :on-parameter as seen here:  
[http://pastie.textmate.org/59526](http://pastie.textmate.org/59526)

Well, nothing happens. No error, no debug information using firebug,  
it just seems as if the browser would ignore that observe\_field-stuff.

Does anyone have a clue?

---

<div class="post-metadata">

**Author:** ![Javier\_CH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c57346/32.png) [@Javier\_CH](https://www.ruby-forum.com/u/Javier_CH)\
**Post date:** [May 7, 2007, 2:23pm UTC](https://www.ruby-forum.com/t/observe-field-and-onblur/103515/2 "2007-05-07T14:23:02Z")

</div>

I guess monday hasn’t arrived to my brain yet. 🙂

solution:  
i did forget to add \<%= observe\_tag\_textfield -%\> in my view.
