From: Derek Smith Date: 2009-11-29T12:40:03+09:00 Subject: Re: erb and js question > This sort of stuff is wonderfully easy to do using jQuery, and I > recommend it strongly. All you would need is: > > jQuery( function($) { > $('#username').focus(); > }); Yeah I heard of jquery from my rails beginner class and now I am trying it, however it is still not working. Please review my code. __CODE__
<% form_tag :action => 'login' do %>
<%= text_field_tag 'username' %> <%= password_field_tag 'password' %> <%= image_submit_tag 'login.png' %>

<% end %>
-- Posted via http://www.ruby-forum.com/.