Intermec 760 User Guide

Page of 82
 
iBrowse User’s Guide
71
Example
Create two edit controls and trap the TAB key to set focus to the next edit 
control.
<HTML>
<HEAD></HEAD>
<BODY>
EditBox1 <OBJECT ID=”IBEAX1” CLASSID=”CLSID:D8A6AACE-0F02-
4440-8F07-64CF68F33DE9” WIDTH=”50” HEIGHT=”25”>
EditBox2 <OBJECT ID=”IBEAX2” CLASSID=”CLSID:D8A6AACE-0F02-
4440-8F07-64CF68F33DE9” WIDTH=”50” HEIGHT=”25”>
</BODY>
<SCRIPT LANGUAGE=”JSCRIPT” FOR=”IBEAX1” 
EVENT=”OnKeyPress()”>
if (key == 9)
{
IBEAX2.SetFocus(1);   // set focus to the second control
Return -1;                     // no need to pass the key 
back to the control
}
return 0;    // pass the key value along a
</SCRIPT>
<SCRIPT LANGUAGE=”JSCRIPT” FOR=”IBEAX2” 
EVENT=”OnKeyPress()”>
if (key == 9)
{
IBEAX1.SetFocus(1);   // set focus to the first control
Return -1;                     // no need to pass the key 
back to the control
}
return 0;    // pass the key value along a
</SCRIPT>
</HTML>