Rotating Ad Banners

C

Craig

Is there a way for each different ad to have a separate hyperlink associated with it? So far I can only use one for all of the ads that I have.
 
J

Jim Buyens

-----Original Message-----
Is there a way for each different ad to have a separate
hyperlink associated with it? So far I can only use one
for all of the ads that I have.

Yes. Please refer to:

Banner Ad Manager Displays Gray Box or Nothing
http://www.interlacken.com/winnt/tips/tipshow.aspx?tip=26

Or, if you prefer JavaScript, try inserting this script
where you want the banner to appear.

<script>
pics = new Array("sample10.jpg",
"sample11.jpg",
"sample12.jpg");
lnks = new Array("http://www.microsoft.com",
"http://www.google.com",
"http://www.cnn.com");
curDate = new Date();
curTim = curDate.getTime();
picNum = curTim % pics.length;
document.write("<a href='" + lnks[picNum] +
"'><img src='photos/" + pics[picNum] +
"' border='0'></a>");
</script>

Here some things to keep in mind when using this script:

o You can specify as many pictures as you want in the
statement that begins on line 2.

o You must specify an equal number of links in the
statement that begins on line 5. These will
correspond to the pictures on a 1:1 basis.

o In the statement that appears in lines 2 through 4
from the bottom, be sure to specify the correct path
from the page that uses the script to the folder that
contains the pictures.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
T

Thomas A. Rowe

Not when using the FP Banner Ad Manager Java Applet.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================


Craig said:
Is there a way for each different ad to have a separate hyperlink
associated with it? So far I can only use one for all of the ads that I
have.
 
J

JFL

OK, when using this code, what else besides the pic names and links do
need to plug in?? What about time? position ect ect??


Thanks!
Jason


Jim said:
[B<script>
pics = new Array("sample10.jpg",
"sample11.jpg",
"sample12.jpg");
lnks = new Array("http://www.microsoft.com",
"http://www.google.com",
"http://www.cnn.com");
curDate = new Date();
curTim = curDate.getTime();
picNum = curTim % pics.length;
document.write("<a href='" + lnks[picNum] +
"'><img src='photos/" + pics[picNum] +
"' border='0'></a>");
</script>

Here some things to keep in mind when using this script:

o You can specify as many pictures as you want in the
statement that begins on line 2.

o You must specify an equal number of links in the
statement that begins on line 5. These will
correspond to the pictures on a 1:1 basis.

o In the statement that appears in lines 2 through 4
from the bottom, be sure to specify the correct path
from the page that uses the script to the folder that
contains the pictures.

[/B
 
J

Jim Buyens

JFL said:
OK, when using this code, what else besides the pic names and links do I
need to plug in??
Nothing.

What about time?

What about it?

Are you worried about the call to curDate.getTime()? The getTime
method returns an integer value representing the number of
milliseconds between midnight, January 1, 1970 and the date that the
curDate variable refers to (i.e. the current date). Dividing this by
the number of pictures produces an essentially random integer between
zero and the number of pictures minus one.
position ect ect??

You put the script where you want the pictures to appear.
Thanks!
Jason


Jim said:
<script>
pics = new Array("sample10.jpg",
"sample11.jpg",
"sample12.jpg");
lnks = new Array("http://www.microsoft.com",
"http://www.google.com",
"http://www.cnn.com");
curDate = new Date();
curTim = curDate.getTime();
picNum = curTim % pics.length;
document.write("<a href='" + lnks[picNum] +
"'><img src='photos/" + pics[picNum] +
"' border='0'></a>");
</script>

Here some things to keep in mind when using this script:

o You can specify as many pictures as you want in the
statement that begins on line 2.

o You must specify an equal number of links in the
statement that begins on line 5. These will
correspond to the pictures on a 1:1 basis.

o In the statement that appears in lines 2 through 4
from the bottom, be sure to specify the correct path
from the page that uses the script to the folder that
contains the pictures.

[/B]
 
Top