Detecting PPC 2002 vs. 2003 in ASP

D

Don Miller

I can't seem to find at MS how to detect the 2002 OS vs. 2003 OS for web
applications using ASP. This is the only page I could find
(http://msdn.microsoft.com/library/en-us/guide_ppc/htm/designing_web_sites_f
or_internet_explorer_for_pocket_pc_cheo.asp) and it only tells how to detect
2000 vs. 2002 (and much of the graphic is cutoff on the right).



It has the code below but it doesn't tell me how to distinguish between 2002
and 2003 in ASP:

if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
' add Pocket PC 2003 specific code.
else
' add Pocket PC 2002 specific code.
else
' add Pocket PC 2000 specific code.
end if

And then it has client-side code like this:

// Check for Pocket PC
var isPPC = strNav.indexOf("240x320");
if(isPPC > -1) {
var is2002 = strNav.indexOf("PPC");
if(is2003 > -1) {
// add Pocket PC 2003 specific code.
}
else
if(is2002 > -1) {
// add Pocket PC 2002 specific code.
}

but I don't see where the "is2003" variable comes from????

Also, the BROWCAP.INI file that is supposed to contain the new browser info
was a 2000 version. Is there an updated file for ASP developers somewhere?

Thanks for any help.
 
T

Tom B

The code has nested if statements.


'Check for Pocket PC
if (InStr(Request.ServerVariables("HTTP_UA_OS"), "POCKET PC")) then
if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
' add Pocket PC 2003 specific code.
else
' add Pocket PC 2002 specific code.
else
' add Pocket PC 2000 specific code.
end if
else
' add code for other platforms.
end if

so if the server variabele HTTP_UA_OS contains POCKET PC then you know it's
either 2002 or 2003
if the server variable HTTP_USER_AGENT contains PPC (and the above is true)
then it's 2003 otherwise it's 2002

The other part of the code you are referring to is client-side.
 
D

Don Miller

Doh!

Tom B said:
The code has nested if statements.


'Check for Pocket PC
if (InStr(Request.ServerVariables("HTTP_UA_OS"), "POCKET PC")) then
if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
' add Pocket PC 2003 specific code.
else
' add Pocket PC 2002 specific code.
else
' add Pocket PC 2000 specific code.
end if
else
' add code for other platforms.
end if

so if the server variabele HTTP_UA_OS contains POCKET PC then you know it's
either 2002 or 2003
if the server variable HTTP_USER_AGENT contains PPC (and the above is true)
then it's 2003 otherwise it's 2002

The other part of the code you are referring to is client-side.



(http://msdn.microsoft.com/library/en-us/guide_ppc/htm/designing_web_sites_f
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top