home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_05.cab / demorot.asp < prev    next >
Text File  |  1997-10-20  |  2KB  |  97 lines

  1. <%@ Language=VBScript  %>
  2.  
  3. <% 
  4.  Response.Buffer = true
  5.  Response.Clear
  6.  Response.Expires = 0     
  7.  %>
  8.  
  9. <!doctype html public "-//W3C//DTD HTML 3.2//EN">
  10. <html>
  11. <head>
  12.     <title>ASP Tutorial: Ad Rotator Demonstration</title>
  13.  
  14. <SCRIPT LANGUAGE="JavaScript">
  15.     TempString = navigator.appVersion
  16.     if (navigator.appName == "Microsoft Internet Explorer"){    
  17. // Check to see if browser is Microsoft
  18.         if (TempString.indexOf ("4.") >= 0){
  19. // Check to see if it is IE 4
  20.             document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
  21.         }
  22.         else {
  23.             document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
  24.         }
  25.     }
  26.     else if (navigator.appName == "Netscape") {                        
  27. // Check to see if browser is Netscape
  28.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
  29.     }
  30.     else
  31.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
  32.  
  33. </script> 
  34.  
  35.  
  36.  
  37.  
  38. </head>
  39.  
  40.  
  41.  
  42.  
  43. <body bgcolor="#FFFFFF" >
  44.  
  45. <h1><a name="usingthebrowsercapabilitiescomponent">Lesson 2: A Demonstration of the Browser Capabilities Component</a></h1>
  46. <p>
  47.  
  48.  
  49. <%  
  50. Set objBrowser = Server.CreateObject("MSWC.BrowserType") 
  51. If objBrowser.browser = "IE"  and  objBrowser.majorver = "4" Then 
  52. %>
  53.  
  54. <p>Your Web browser is Internet Explorer version 4.0, or later. This means that you are seeing a Dynamic HTML ad rotator.</P> 
  55.  
  56. <CENTER>
  57. <OBJECT ID="scriptlet" 
  58.         STYLE="    position:relative;height:200;width:200"
  59.         type="text/x-scriptlet"
  60.         data="..\tutorial\rotate4.htm">
  61. </OBJECT>
  62. </CENTER>
  63.  
  64. <% Else %>
  65.  
  66. <p>Your Web browser is not Internet Explorer version 4.0, or later. This means that you are seeing a static image displayed using the ASP Ad Rotator component. (Refresh this page to see a new image.) </p>
  67. <br>
  68. <%  Set Ad = Server.CreateObject("MSWC.Adrotator") %>
  69. <CENTER>
  70. <%= Ad.GetAdvertisement("/iishelp/iis/htm/tutorial/adrot.txt") %>
  71. </CENTER>
  72. <% End If %>
  73.  
  74.  
  75.  
  76. <center>
  77. <br>
  78. <a href="/iishelp/iis/htm/asp/iiatmd2.asp#browscapdemo">Return to Module 2.</a>
  79. </center>
  80.  
  81. <br>
  82. <br>
  83.  
  84.  
  85.  
  86. <center><hr color=#cccccc noshade size=1></center>
  87. <p><font size="1" face="Arial">The names of companies, products, people, characters and/or data mentioned herein are fictitious and are in no way intended to represent any real individual, company, product or event unless otherwise noted.</font></p>
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94. </body>
  95. </html>
  96.  
  97.