3 input focus and the tab key – Casio Naurtech CETerm Ver.5.1 Web Browser Programming Manual User Manual
Page 44
 
N
AURTECH
W
EB
B
ROWSER
S
MART
C
LIENTS FOR
W
INDOWS
CE .NET / P
OCKET
PC
 
 
 
 
 
Web Browser Programming Guide
Page 44
 
 
} 
</script> 
 
4.3 I
NPUT
F
OCUS AND THE
T
AB
K
EY
One of the first limitations you are likely to notice about Pocket Internet Explorer 
is that the Tab key does not always move the input focus as you expect from 
using the desktop Internet Explorer. Pocket IE on the Pocket PC 2002 and 
Windows Mobile platforms has the most limited behavior. 
 
The Naurtech Web Browser provides enhanced focus control on the Pocket PC 
platforms. If you only need to move between native HTML text input elements, 
then the Tab key should perform as you expect from the desktop. The Tab key 
should also work as expected on Windows CE .NET or 5.0 platforms. However, 
currently a Tab post-amble will not advance the focus on all platforms. 
 
Some other vendors provide a text input control like Naurtech’s TextX to manage 
the focus under Pocket PC 2002 or Windows Mobile. TextX will perform 
similarly, but we recommend you avoid using ActiveX controls for input to simplify 
and accelerate development. If you must use the ActiveX text input, then you 
can provide additional focus management. 
 
The following example shows how to track the focus and advance the focus 
when the Tab key is pressed. These techniques will work for the native HTML 
text input elements on Windows CE platforms or with the ActiveX text input on 
Pocket PC 2002 and Windows Mobile. Both support the OnKeyPress event 
handlers. 
 
This first example uses native HTML text input on Windows CE .NET. Note the 
use of “document.activeElement” in this example: 
 
<html> 
<head> 
<title>Naurtech Tab Demo Page</title> 
<meta http-equiv="Scanner" content="Enabled"> 
<meta http-equiv="ScannerNavigate" 
content="Javascript:onscan('%s','%s','%s','%s','%s');"> 
<meta http-equiv="OnKey0x0D" 
content="Javascript:document.form1.clear.click();"> 
 
</head> 
<body scroll=no onload="Javascript:document.form1.scan1.focus();"> 
<form name=form1> 
<center> 
<font size=+2> 
Naurtech Tab Demo<br> 
</font>