Auto-select form box
Kjell G. Nilsen
kjell.nilsen at sting.bibsent.no
Mon Jan 12 09:19:14 EST 1998
>Is there a method to have the cursor automatically appear in a form box
when a page is loaded?
>
>I would like to modify the search pages on our catalog (DRA Web) to
minimize user 'mousing'.
You could use javascript:
<html><body><h1>heisan</h1>
<form name="sample" method=post action="/cgi-bin/statistikk2">
Navn: <input type=text name=navn><br>
Alder: <input type=text name=alder><br>
</form></body></html>
<SCRIPT language="JavaScript">
<!-- test
document.sample.alder.focus();
// test -->
</SCRIPT>
Where sample is the name attribute in the form tag and alder is the name of
the input tag. The script must come after the form.
Kjell
***********************************************************
Kjell G. Nilsen
STING (http://sting.bibsent.no)
Tlf. +47 22 08 34 90 / Fax. +47 22 19 64 43
More information about the Web4lib
mailing list