5 how to identify the current browser – Casio Naurtech CETerm Ver.5.1 Web Browser Programming Manual User Manual

Page 49

Advertising
background image

N

AURTECH

W

EB

B

ROWSER

S

MART

C

LIENTS FOR

W

INDOWS

CE .NET / P

OCKET

PC




Web Browser Programming Guide

Page 49


sendida( "IDA_SESSION_S4", 0 );
}

function startsession(id)
{
if (id >= 1 && id <=4)
{
// Switch to session
sendida("IDA_SESSION_S" + id, 0);
// Connect if not connected
sendida("IDA_SESSION_CONNECT", id);
return;
}
else
{
alert("Unsupported session.");
}
}

function sendida(ida, s)
{
// PocketPC 2002
//CEBrowseX.CETerm.SendIDA(ida, s);

// Windows Mobile
document.CEBrowseX.CETerm.SendIDA(ida, s);
}
</script>
</body>
</html>

4.5 H

OW TO

I

DENTIFY THE

C

URRENT

B

ROWSER

The Naurtech Web Browser returns the same User-Agent HTTP value as does
the standard Windows Pocket IE browser. This is necessary to indicate the
fundamental capabilities of the browser to the Web server. There are other ways
for the Web application to determine if the Naurtech Web Browser is the client.

You can use the GetUnitInformation META tag identifier to retrieve the version
number and send this to the host. As of this writing, the current version number
is “5.1.0”. Most other browsers will not support the GetUnitInformation feature
and your HTML must be prepared to return an empty value.

<html>
<head>
<meta http-equiv="GetUnitInformation"
content="Javascript:saveunitinfo('%s','%s','%s');">
<script language=javascript>

Advertising