PDA

View Full Version : image rotator


damb66
02-24-2004, 03:28 PM
here is the script I cannot get to work. Here is the page I am trying it out on

http://www.webstuffinc.com/links-search-engine-marketing-internet-wisconsin.htm

3 or 4 lines down, you will see the image src=http://
This is the only line I have changed.

If I leave in the code -----> http://www.a1javascripts.com/images/Arcdetri.jpg" that came with the script...the first image in the ROTATOR says I am stealing graphics and band width from A1javascripts, and I ama bandwidth bandit.

I did my best to add my graphics to the images queue. I changed that image src URL because if I didn't the only image that works in the Rotator (when viewed online) is that I am stealing bandwidth from A1. Can I get someone to help me?

Thanks!


<!-- -->
<table border="0" cellpadding="0" align="center">
<caption><strong>Picture Gallery</strong></caption>
<tr>
<td width="100%"><img src=http://www.webstuffinc.com/images/*" width="300" height="240" name="photoslider"></td>
</tr>
<tr>
<td width="100%"><form method="POST" name="rotater">
<div align="center"><center><p><script language="JavaScript1.1">
var photos=new Array()
var which=0

/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
photos[0]="/dbimember.gif"
photos[1]="/WebStuff Logo Letterhead.jpg"
photos[2]="/web-marketing-irrelevant.jpg"
photos[3]="/WebStuff-Web-Header-Right.jpg"
photos[4]="/webstuff-web-advertising.gif"


function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which]
}
}

function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
}
else window.status='End of gallery'
}
</script><input type="button" value="&lt;&lt;Back" name="B2"
onClick="backward()"> <input type="button" value="Next&gt;&gt;" name="B1"
onClick="forward()"><br>
<a href="#" onClick="which=1;backward();return false"><small>Start Over</small></a></p>
</center></div>
</form>
</td>
</tr>
</table>
<!-- -->

coothead
02-24-2004, 04:32 PM
Hi there damb66,

Welcome to these forums :D
change this line thus...

<td width="100%"><img src="http://www.webstuffinc.com/images/dbimember.gif" width="300" height="240" name="photoslider"></td>

and these also..

photos[0]="http://www.webstuffinc.com/images/dbimember.gif"
photos[1]="http://www.webstuffinc.com/images/WebStuff Logo Letterhead.jpg"
photos[2]="http://www.webstuffinc.com/images/web-marketing-irrelevant.jpg"
photos[3]="http://www.webstuffinc.com/images/WebStuff-Web-Header-Right.jpg"
photos[4]="http://www.webstuffinc.com/images/webstuff-web-advertising.gif"

damb66
02-25-2004, 07:27 AM
Thanks Paladin

I have more questions, please.

This fix of yours worked fine. The very first picture is not showing up once the page is refreshed however

the dreaded box with the red x. When I hit NEXT, the 2nd picture shows up fine. If I hit BACK, the 1st picture works fine!

Just not as a starting pic...when you first come to the page or refresh it is not displaying.

Thanks for your help!

I know the pics are looking fuzzy and wierd. I am assuming I need to optimize all the pictures to that ONE setting? That will be hard, but doable.

Thanks Again

damb66
02-25-2004, 11:38 AM
perhaps someone other than Paladin, near my own time zone has an opinion why this script is not showing the 1st Pic
when you first come to the page or hit refresh.

However, Pic#1 is there when you BACK BACK up to it in the NEXT/BACK scroll button queue.

Here is the link where the script is running

http://www.webstuffinc.com/links-search-engine-marketing-internet-wisconsin.htm

I know I have to optimize my pics to match whatever size I pick the Box to be....

Thanks All

Dan

TeHpHoBiA
02-25-2004, 12:10 PM
<img "src=http://www.webstuffinc.com/images/dbimember.gif" width="300" height="240" name="photoslider">

coothead
02-25-2004, 12:37 PM
Hi there TeHpHoBiA,

<img "src=http://www.webstuffinc.com/images/dbimember.gif" width="300" height="240" name="photoslider">
I do not think that it is advisable
to place quotation marks in that position :D

damb66

I have had no problems with the revised code,
so I am unable to say why it does not work for you.
Your link is dead so I cannot view your page or recheck your code

damb66
02-25-2004, 01:44 PM
http://www.webstuffinc.com/links-search-engine-marketing-internet-wisconsin.htm

that link?

seems to be working unless it word-wrapped wrong or did not fit in your URl bar or something.

damb66
02-25-2004, 01:48 PM
Got It!

thanks coothead!

i missed your original quotes mark at the http:

added it and ZIP it worked fine

sorry to run you around

Dan

coothead
02-25-2004, 02:16 PM
Hi there damb66,

Glad to hear that you have it sorted now.
I have also checked it on all the major
browsers and you will be pleased to know
that it it works OK

damb66
02-25-2004, 02:21 PM
many thanks to you and teHphobia