92 lines
3.7 KiB
HTML
92 lines
3.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
|
|
<TITLE>GetAdvertisement</TITLE>
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
<!--
|
|
TempString = navigator.appVersion
|
|
if (navigator.appName == "Microsoft Internet Explorer"){
|
|
// Check to see if browser is Microsoft
|
|
if (TempString.indexOf ("4.") >= 0){
|
|
// Check to see if it is IE 4
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
}
|
|
}
|
|
else if (navigator.appName == "Netscape") {
|
|
// Check to see if browser is Netscape
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
//-->
|
|
</script>
|
|
<SCRIPT LANGUAGE="VBScript">
|
|
<!--
|
|
Sub Window_OnLoad()
|
|
Dim frmContents
|
|
On Error Resume Next
|
|
If Not Parent Is Nothing Then
|
|
Set frmContents = Parent.Contents
|
|
If Not frmContents Is Nothing Then
|
|
frmContents.Window.TOCSynch_Click
|
|
End If
|
|
End If
|
|
End Sub
|
|
//--></SCRIPT><META NAME="DESCRIPTION" CONTENT="Internet Information Services reference information">
|
|
<META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'>
|
|
<META NAME="MS.LOCALE" CONTENT="EN-US">
|
|
<META NAME="MS-IT-LOC" Content="Internet Information Services">
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
|
|
<H3><A NAME="_getadvertisement"></A><SUP></SUP>GetAdvertisement</H3>
|
|
|
|
<P>The <B>GetAdvertisement </B>method retrieves the next advertisement from the Rotator Schedule file. Each time the script is run, such as when a user opens or refreshes a page, the method retrieves the next scheduled advertisement.</P>
|
|
|
|
<H6>Syntax</H6>
|
|
|
|
<P><I>AdRotator</I><B>.GetAdvertisement( </B><I>rotationSchedulePath </I><B>)</B> </P>
|
|
|
|
<P> </P>
|
|
|
|
<H6>Parameters</H6>
|
|
|
|
<DL>
|
|
<DT><I>rotationSchedulePath</I></DT>
|
|
|
|
<DD>Specifies the location of the Rotator Schedule file relative to the virtual directory. For example, if the physical path was C:\Inetpub\Wwwroot\Ads\Adrot.txt (where Wwwroot is the "/" virtual directory) you would specify the path \Ads\Adrot.txt.</DD>
|
|
</DL>
|
|
|
|
<H6>Return Values</H6>
|
|
|
|
<P>Returns HTML that displays the advertisement in the current page. </P>
|
|
|
|
<H6>Example</H6>
|
|
|
|
<P>The following example uses all the properties to display a different advertisement each time a user views the Web page.</P>
|
|
|
|
<P>--- AdRot.asp ---</P>
|
|
|
|
<PRE><CODE><%
|
|
Set ad = Server.CreateObject("MSWC.AdRotator")
|
|
ad.Clickable = True
|
|
ad.Border = 1
|
|
ad.TargetFrame = "target=_TOP"
|
|
Response.Write ad.GetAdvertisement("adrot.txt")
|
|
%>
|
|
</CODE></PRE>
|
|
|
|
<P>The following HTML is generated by the <B>GetAdvertisement</B> method and is added to the page's output, displaying the next advertisement in the Rotator Schedule file.</P>
|
|
|
|
<PRE><CODE><A HREF="adredir.asp?url=http://www.microsoft.com/windows2000/guide/professional/overview/&image=http://www.microsoft.com/library/homepage/images/init_win2k.gif" TARGET="target=_TOP"><IMG SRC="http://www.microsoft.com/library/homepage/images/init_win2k.gif" ALT="Introducing Microsoft Windows XP Professional!" WIDTH=340 HEIGHT=100 BORDER=1></A>
|
|
</CODE></PRE>
|
|
<hr class="iis" size="1">
|
|
<p align="center"><em><a href="../../../common/colegal.htm">© 1997-2001 Microsoft Corporation. All rights reserved.</a></em></p>
|
|
</BODY>
|
|
</HTML>
|