# Set cursor in text\_field\_tag?

**URL:** <https://www.ruby-forum.com/t/set-cursor-in-text-field-tag/103517>\
**Category:** Rails\
**Created:** [May 7, 2007, 2:42pm UTC](https://www.ruby-forum.com/t/set-cursor-in-text-field-tag/103517 "2007-05-07T14:42:04Z")\
**Posts on this page:** 1\
**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:42pm UTC](https://www.ruby-forum.com/t/set-cursor-in-text-field-tag/103517/1 "2007-05-07T14:42:04Z")

</div>

Let’s say I’ve text\_field\_tag A and B.

I type something in A and hit the tabulator-key. An observe\_field-  
helper-method gets triggered, some fancy Ajax-JS-stuff happens, the  
formerly disabled field B gets enabled and now I’m able to type into  
textfield B.

No, how can I say with JS/Prototype/Railshelpers that I’d like the  
cursor to jump right in textfield B after the Ajax-JS-stuff happend?  
So the user can just write along after hitting the tab-key and  
changing from A to B?
