PDA

View Full Version : Blendable Image



Gail
02-06-2005, 03:14 PM
Hi,
I love the blendable image script. I work in GoLiveCS and so do not do a lot of html coding. I pasted script in to my practice page. I linked to pictures this way
var slideimages=new Array("Featured4/gunner.jpg""hero.gif")
but have an x in the preview.
I also put this for the first image
<a href="javascript:gotoshow()"><img src="gunner.gif" name="slide" border=0
Could someone help with more detail directions. I am sure I am not doing all the steps.

Thanks!
Gail

shes_bad_bad_badass
02-06-2005, 03:17 PM
Try putting the full link to the picture.

Like: "http://www.sitename.com/picturename.gif"

Instead of just "picturename.gif"

Gail
02-06-2005, 03:28 PM
I had that before but did not work
This is what I have now.

//specify images
var slideimages=new Array("http://www.wpahumane.org/"Featured4/gunner.jpg""hero.gif")

This is after head
<a href="javascript:gotoshow()"><img src="http://www.wpahumane.org/Featured4/"gunner.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

(and then the rest of the script is in there)

Do I need to give you more or do you see a problem?
THanks for the help

cr3ative
02-06-2005, 03:30 PM
Change from:

//specify images
var slideimages=new Array("http://www.wpahumane.org/"Featured4/gunner.jpg""hero.gif")

This is after head
<a href="javascript:gotoshow()"><img src="http://www.wpahumane.org/Featured4/"gunner.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

To:


//specify images
var slideimages=new Array("http://www.wpahumane.org/Featured4/gunner.jpg","hero.gif")

This is after head
<a href="javascript:gotoshow()"><img src="http://www.wpahumane.org/Featured4/gunner.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

cr3ative

Gail
02-06-2005, 03:53 PM
I'm sorry - that is not working. Do the sizes of my images matter for the test.

Here is more. Know it is a lot to look at

//specify interval between slide (in mili seconds)
var slidespeed=5000

//specify images
var slideimages=new Array("http://www.wpahumane.org/"Featured4/gunner.jpg""hero.gif")

//specify corresponding links
var slidelinks=new Array("http://www.dynamicdrive.com","http://javascriptkit.com","http://www.geocities.com")

var newwindow=1 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}



// --></script>
</csactiondict>
</head>
xd
<a href="javascript:gotoshow()"><img src="http://www.wpahumane.org/Featured4/"gunner.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>


<script language="JavaScript1.1">
<!--

var whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (ie) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()

//-->

cr3ative
02-06-2005, 04:00 PM
You still haven't done what I said in my post :)

cr3ative

mwinter
02-06-2005, 04:10 PM
var slideimages=new Array("http://www.wpahumane.org/"Featured4/gunner.jpg""hero.gif")As cr3ative was attempting to indicate, this is invalid. You have a nested double quote in the first URL and you haven't separated the second string with a comma.


var slideimages = ['http://www.wpahumane.org/Featured4/gunner.jpg',
'hero.gif'];
var slidelinks=new Array("http://www.dynamicdrive.com","http://javascriptkit.com","http://www.geocities.com")I can't imagine you want these values as URLs for your images. Remember to change them (and have the same number as there are images).


<a href="javascript:gotoshow()">Use of the javascript pseudo-scheme should be avoided. At the very least, the opening tag should be


<a href="#" onclick="gotoshow();return false;">however links should really "go" somewhere. I haven't looked for the respective page that lists this script, but I suspect the instructions don't reflect this.


<img src="http://www.wpahumane.org/Featured4/"gunner.gif" ...Again, you have a nested double quote.


<script language="JavaScript1.1">
<script type="text/javascript">The language attribute has been deprecated for over six years.

Good luck,
Mike

Gail
02-06-2005, 05:00 PM
Mike,
Thank you - I will look over your comments. I did not put links in yet until I could see if the images would work and I would take out the other url.

Could you just explain this

To put this html into an existing HTML document, you must copy the JavaScript and
paste it in a specific location within the destination HTML document. You must then copy
and paste the table in a different location.
I do not understand the bold part.

I imagine some of the code is "unusual" with the GoLive but have had no problems with how it works. This is the page I would like to put this on if you care to look www.wpahumane.org/main.html (It will take me a little while to design) Appreciate your input on the bold part.

mwinter
02-06-2005, 10:44 PM
Could you just explain this [instructions]Not without context. The instructions don't appear to be related to the Blending Slideshow (http://www.dynamicdrive.com/dynamicindex14/image4.htm). Could you provide a link to the page that contains the text?

Mike