D
Derek Smith
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
<!-- Begin Login Bar -->
<div id="login">
<% form_tag :action => 'login' do %>
<br />
<label for='username'>Username:</label>
<%= text_field_tag 'username' %>
<label for='password'>Password:</label>
<%= password_field_tag 'password' %>
<%= image_submit_tag 'login.png' %>
<br />
<br />
<% end %>
</div>
<!-- End Login Bar -->
Yet I am still unsure how to integrate this code, maybe just the JS
block?
thank you!
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
<!-- Begin Login Bar -->
<div id="login">
<% form_tag :action => 'login' do %>
<br />
<label for='username'>Username:</label>
<%= text_field_tag 'username' %>
<label for='password'>Password:</label>
<%= password_field_tag 'password' %>
<%= image_submit_tag 'login.png' %>
<br />
<br />
<% end %>
</div>
<!-- End Login Bar -->
Yet I am still unsure how to integrate this code, maybe just the JS
block?
thank you!