Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<object> and Windows 7+ vs Windows XP

Status
Not open for further replies.

ahoodin7

Programmer
Jun 16, 2004
72
0
0
US
I am trying to load objects one way for Windows 7+ and another way for Windows XP.
I use the CODEBASE for Windows XP, and not for Windows 7. Regardless of OS, the
first method appears to be used by the browser.

#1 Why is this?
#2 Is there a case where the browser downloads the control from the server if the CODEBASE tag is left off?

My understanding is that if you use the CODEBASE tag, then the browser checks the control version and if an old
version exists on the Client, downloads it from the server.

Code:
If strcomp(trim(strOSA),"Windows NT 6.1") = 0 Then
%>
<object ID="oPersonalInbox" 
CLASSID="CLSID:0006F063-0000-0000-C000-000000000046" 
HEIGHT="100%"
WIDTH="100%">
<param NAME="View" VALUE="">
<param NAME="Folder" VALUE="Inbox">
<param NAME="Namespace" VALUE="MAPI">
<param NAME="Restriction" VALUE="">
<param NAME="DeferUpdate" VALUE="0">
</object>

<%
else
%>
<object ID="oPersonalInbox" 
CLASSID="CLSID:0006F063-0000-0000-C000-000000000046" 
CODEBASE="outlctlx.CAB#ver=9,0,0,3203"
HEIGHT="100%"
WIDTH="100%">
<param NAME="View" VALUE="">
<param NAME="Folder" VALUE="Inbox">
<param NAME="Namespace" VALUE="MAPI">
<param NAME="Restriction" VALUE="">
<param NAME="DeferUpdate" VALUE="0">
</object>
<%
end if
 
Here is a more complete source code listing:
Code:
Dim strAgentA
Dim aryAgentElemsA, strOSA

strAgentA = Request.Servervariables("HTTP_USER_AGENT")
aryAgentElemsA = Split(strAgentA, ";")
strOSA = aryAgentElemsA(2)

If strcomp(trim(strOSA),"Windows NT 6.1") = 0 Then
%>
<object ID="oPersonalInbox"> 
CLASSID="CLSID:0006F063-0000-0000-C000-000000000046" 
HEIGHT="100%"
WIDTH="100%">
<param NAME="View" VALUE="">
<param NAME="Folder" VALUE="Inbox">
<param NAME="Namespace" VALUE="MAPI">
<param NAME="Restriction" VALUE="">
<param NAME="DeferUpdate" VALUE="0">
</object>

<%
else
%>
<object ID="oPersonalInbox"> 
CLASSID="CLSID:0006F063-0000-0000-C000-000000000046" 
CODEBASE="outlctlx.CAB#ver=9,0,0,3203"
HEIGHT="100%"
WIDTH="100%">
<param NAME="View" VALUE="">
<param NAME="Folder" VALUE="Inbox">
<param NAME="Namespace" VALUE="MAPI">
<param NAME="Restriction" VALUE="">
<param NAME="DeferUpdate" VALUE="0">
</object>
<%
end if
Apologies for being too short.
 
1) The ASP you have works as expected for me, except that it will only execute the first block (without CODEBASE) for a Windows 7 machine. Windows 8, Vista, XP etc would all use second block (with CODEBASE). (Note that Windows 8 is NT 6.2)

2) Add a response.write strOSA so you can see what value you are getting on the various client browsers this code is run on.

3) looks like you have an extra > in the object definition in your second sample (thought not in the first?) Which are you using?
<object ID="oPersonalInbox"[highlight #FCE94F]>[/highlight]
CLASSID="CLSID:0006F063-0000-0000-C000-000000000046"

should be
<object ID="oPersonalInbox"
CLASSID="CLSID:0006F063-0000-0000-C000-000000000046"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top