Hi friends! I’m working in Dreamweaver CC and have inserted and revised a random image script on an existing page. It works great when previewing from my desktop but it does NOT work after uploading to the server. I’ve tried everything I could think of and can’t make headway with it. The links to the images are good and they all work — just not with the script. The client is about ready to kill me (and not with kindness). 😮 Can anyone help? ? I’d be ever so appreciative!!
Here’s the link to the page where I used the script: [URL=”http://decoymag.com/classifieds/classifi.htm”]http://decoymag.com/classifieds/classifi.htm
The image, which changes upon reload/revisit, is supposed to be appearing belong the small ‘CLASSIFIEDS’ header and before the paragraph text which begins with “Following is a complete list of…”
Here’s a snippet of the script that I inserted into the page – perhaps you’ll see the problem right away? (Gee, I hope so!)
[COLOR=”#B22222″]<script language=”JavaScript”>
<!–
/*
Random Image Script- By JavaScript Kit ([url]http://www.javascriptkit.com
Over 400+ free JavaScripts here!
Keep this notice intact please
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]=”../advertisers/RJG/RJG1.jpg”
myimages[2]=”../advertisers/RJG/RJG2.jpg”
myimages[3]=”../advertisers/RJG/RJG3.jpg”
myimages[4]=”../advertisers/RJG/RJG4.jpg”
myimages[5]=”../advertisers/RJG/RJG5.jpg”
myimages[6]=”../advertisers/RJG/RJG6.jpg”
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]=”
imagelinks[2]=”
imagelinks[3]=”
imagelinks[4]=”
imagelinks[5]=”
imagelinks[6]=”
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write(‘<a href=’+'”‘+imagelinks[ry]+'”‘+’ target=”new” ><img src=”‘+myimages[ry]+'” border=0></a>’)
}
random_imglink()
//–>
</script>
Once again, THANK YOU MY FRIEND(S)!!!!
[I]— ‘ding