Image rotation script not showing

Image rotation script not showing

Post by Jacki » Wed, 20 Nov 2002 05:51:59

I saw recommendations to use scripts at if you wanted
multiple image rotation scripts on the same page. I tried to use it on an
existing site with just one banner at first - but it did not show at all.
I then created a brand new one page web and placed the code, changed for my
images, into the page, still the same - no show.
I must be doing something wrong and have checked it many times. If some one
could show me where I am going wrong I would be very grateful.
The script at dyn-web is  'Multiple

The code below is my one page site. All I did was to change the image and
.js reference and removed the second banner code.
I have stored the images in a folder in the root web called 'scro' and
placed the dw_write.js in the root as well.
Thank you

My page code


<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">

<style type="text/css">
body, td { font-family: verdana, arial, helvetica, sans-serif;
font-size: 12px; }
h1 { font-size:16px }
a:link { color:#03c }
a:visited { color:#69c }

h1, h2, p { margin: 0 0 .8em 0 }


/* banners can be positioned absolute or relative */
#ad1, #ad2 { position:relative; z-index:20 }
/* class for banner (see initBanner function) */
.b1 {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 14px; font-weight:bold; color:#00c;

.b1 a:link, .b1 a:visited { color:#03c }

<script src="/dw_write.js" type="text/javascript"></script>
<script type="text/javascript">
This code is from Dynamic Web Coding
Copyright 2001-2 by Sharon Paine
See Terms of Use at
Permission granted to use this code
as long as this entire notice is included.

// resize fix for ns4
var origWidth, origHeight;
if (document.layers) {
origWidth = window.innerWidth; origHeight = window.innerHeight;
window.onresize = function() { if (window.innerWidth != origWidth ||
window.innerHeight != origHeight) history.go(0);


// preload images to be included in banners
var imgAr = new Array(

if (document.images) {
var imgs = new Array();
for (var i=0; i<imgAr.length; i++) {
imgs[i] = new Image();
imgs[i].src = imgAr[i];


function bannerObj(id,w,h,x,y,d,cls) {
this.delay=d; this.cls=cls;
this.items = new Array();
this.obj=id+"bannerObj"; eval(this.obj+"=this");


function rotate() {
var cntnt;
if (document.layers) cntnt = '<table width="'+this.w+'"><tr><td class="' +
this.cls + '">' + this.items[this.ctr] +

else cntnt = '<div class="' + this.cls + '">' + this.items[this.ctr] +
if (this.ctr < this.items.length-1) this.ctr++;
else this.ctr = 0;


function addBannerItem(txt) {
this.items[this.items.length] = txt


bannerObj.prototype=new writeObj;
bannerObj.prototype.ctr = 0;
bannerObj.prototype.addItem = addBannerItem;
bannerObj.prototype.rotate = rotate;

var banners = new Array();
function initBanner() {
// args: id, width, height, left, top, delay, class
// delay is amount of time in milliseconds you linger on each item
// set up a class for formatting your banner (last argument here)
banners[0] = new bannerObj('ad1',100,75,0,0,3000);
// add as many items as you like
src="/scro/1slr.jpg" width="100"

height="75" alt="" border="0"></a>');
src="/scro/1asp.jpg" width="100"

height="75" alt="" border="0"></a>');
src="/scro/1cam.jpg" width="100"

height="75" alt="" border="0"></a>');
src="/scro/1dig.jpg" width="100"

height="75" alt="" border="0"></a>');
src="/scro/1com.jpg" width="100"

height="75" alt="" border="0"></a>');
src="/scro/1bin.jpg" width="100"

height="75" alt="" border="0"></a>');





<table align="center" border="0" cellpadding="6" cellspacing="0"
<td valign="top" rowspan="2">
<h1>Rotating Banners</h1>
<p>Add as many banners as you like. Images, text, a mixture, whatever
<p>Read code comments for specific instructions.</p>
<p>Use your browser menu commands to view source or save this file. Don't
forget the necessary <a href="../../js/dw_write.js">dw_write.js</a> file.
Adjust the path to it in the script tags to suit your directory
<p>Please read dyn-web's <a
href="">Terms of Use</a>.</p>
<td width="180" height="60" valign="top">
<!-- banner 1 -->
<div id="ad1"></div>

<td width="180" height="60" valign="top">
<!-- banner 2 -->
<div id="ad2"></div>
<td><a href=""></a></td>
<!-- ns4 needs gif to hold space -->
<td><img src="../../images/clear.gif" width="180" height="2"




1. Images from IMAGES file do not show on published web

I am having difficulty with my page that I uploaded through WS_FTP.
The images are not showing up.  They show in the preview of the
webpage but will not show after publishing.  

Also, is it a bad idea to import a large website?  It seems that I am
having MANY problems with the large one I transferred to FP.  Should I
just start over?

Please help.  The help from you that I have gotten before has moved me
along to be this far along with FP.  Any advice will be appreciated.

Susan Vance

2. PC Telephony error messages - TAPI ??

3. Images do not show if Web Server not running

4. ppp problem on indy R4600

5. Images not showing; not just user error (I don't think)

6. object module format

7. ASP script error not shown in IE

8. uninstalling 95 app

9. Script icons not showing up...

10. Script wizard in FP98 (events not showing)

11. image rotation 360 ?

12. Random Image Rotation

13. Images are not showing