From: Derek Smith Date: 2009-11-13T10:11:58+09:00 Subject: erb and js question Hi All, I did some looking around on google and found a fix for setting the default location of the cursor on a page. The fix is mentioned here: http://techsupt.winbatch.com/TS/T000002021F19.html So my goal is to use Javascript, and place the the focus on one of the boxes. The focus would mean that the typing cursor would be in a certain box, but not the mouse cursor. Here is my code: cat login.html.erb
<% form_tag :action => 'login' do %>
<%= text_field_tag 'username' %> <%= password_field_tag 'password' %> <%= image_submit_tag 'login.png' %>

<% end %>
Yet I am still unsure how to integrate this code, maybe just the JS block? thank you! -- Posted via http://www.ruby-forum.com/.