INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

<object> and Windows 7+ vs Windows XP

<object> and Windows 7+ vs Windows XP

(OP)
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 --> Classic

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 

RE: <object> and Windows 7+ vs Windows XP

(OP)
Here is a more complete source code listing:

CODE --> Classic

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.

RE: <object> and Windows 7+ vs Windows XP

(OP)
Hellp!

RE: <object> and Windows 7+ vs Windows XP

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">
CLASSID="CLSID:0006F063-0000-0000-C000-000000000046"

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close