John,

The script below will do just what you're looking for.

<head>-
<script language=javascript type="text/javascript">
<!--
function onBodyLoad() {
    document.formname.fieldname.focus();

}
// -->
</script>
</head>

<body onload="onBodyLoad()">

Scott Brader
Prairie Software Development LLC
101 East Sadd Street
PO Box 235
North Prairie, WI 53153-0235

Phone: 262.392.9173
Fax: 262.392.9174

Toll Free: 888.821.3427
Mobile: 262.490.1376

Amateurs practice until they get it right,
Experts practice until they can't get it wrong.

-----Original Message-----
From: John Fix 3rd [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 02, 2001 2:48 PM
To: CF-Talk
Subject: OT: Making a form text input box "active"


I'm working on a simple form page to lookup items based on a sku number.
There's a text input and a SUBMIT button.  The page is eventually going to
be used on a PC running IE in kiosk mode, and I want to eliminate the mouse.
I want the text input box to be active by default, so a user can just type a
sku number and press ENTER.

A real quick and dirty version of the page is at
http://www.cornells.com/storelink/item.cfm.

I did some quick browsing in some of my HTML references and can't find a way
to do this.  I haven't done much Javascript, but maybe there's a way to
solve this problem with JS? ANy suggestions would be appreciated.

Thanks!

John
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to