Rate this script:  I Love it  /   I Hate it

Prototype and window.onload


Code


  <% content_for("page_scripts") do %>
    Event.observe(window, 'load',
      function() { $('username').focus() }
    );
  <% end %>

  <script type="text/javascript">
    <%= @content_for_page_scripts %>
  </script>
 

 

 
Prototype and window.onload scripts | Prototype and window.onload snippet | Prototype and window.onload example | Prototype and window.onload tutorial | Prototype and window.onload code