Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




After Work

Highlife Adventures
The best club in Chicago
for Chicago Singles is Highlife Adventures!






Kyoto Sushi
in Chicago, on Lincoln Ave.
Moody's Pub
in Chicago, has great burgers
Skylark
in Chicago, on Halsted .. excellent beer selection!


Javascript » Methods » Coding »

Setting Focus to a Control During Load

     




Setting focus to a default control allows the user to begin typing
without having to use the mouse. In the following example, a listbox named
"lb_cat" exists on form "frm_tttnew". The goal is to set focus to this
control after the form is loaded. Here's how the end of the HTML file
would look.




 <script language="javascript">
 <!--
 //--------------------------------------------------------------------------
   document.frm_tttnew2.lb_cat.focus()
 //--------------------------------------------------------------------------
 // -->
 </script>
 </body>
 </html>
 
Note that this code is after the form definition, and before the last HTML tag.







Javascript : Related Topics

Javascript : Methods : Incrementing a counter within an edit field
Javascript : Methods : Animation Example
Javascript : Methods : Image Mapping Example
Javascript : Methods : Redirecting Page Access
Javascript : Methods : Loading a new page dynamically
Javascript : Methods : Complex Application with Forms
Javascript : Methods : Image Viewer with Prev and Next Buttons
Javascript : Methods : Array Processing, Frameset Writes
Javascript : Methods : Javascript: Where it fits in HTML
Javascript : Methods : Accessing the cookie file
Javascript : Methods : Using include files
Javascript : Methods : Pure virtual call error
Javascript : Methods : Passing variables to windows
Javascript : Methods : Executing Dynamic Code
Javascript : Methods : Single line edit: Data entry issue
Javascript : Methods : Call CGI counter
Javascript : Methods : Dynamic Objects and Names

Sybase Web Site
Sybase Mobile Web Site
Oracle Web Site





Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2010 Stoltenbar Inc All Rights Reserved.