After Work
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.
|
|
|
|