Web Analytics Made Easy -
StatCounter Blending Image Slideshow Script - CodingForum

Announcement

Collapse
No announcement yet.

Blending Image Slideshow Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Blending Image Slideshow Script

    I've gotten this script to work just fine, but as each image is clicked it changes the page location like a standard a href. I'd rather have it open the link in a new window. I tried adding target="_new" but it just opens a bank window with javascript:slidelink()" in the address field.

    Here's the body portion of the script and the dynamic drive URL I found it on.

    <a href="javascript:slidelink()" onMouseover="window.status='Click on the image to learn more about it!';return true" onMouseout="window.status=''"><img src="firstimage.gif" name="slide" border=0 style="filter:blendTrans(duration=3)"></a>
    <script>
    <!--
    ////change number of images below
    var number_of_images=3
    //change speed below (in seconds)
    var speed=3
    var step=1
    var whichimage=1
    function slideit(){
    if (!document.images)
    return
    if (document.all)
    slide.filters.blendTrans.apply()
    document.images.slide.src=eval("image"+step+".src")
    if (document.all)
    slide.filters.blendTrans.play()
    whichimage=step
    if (step<number_of_images)
    step++
    else
    step=1
    if (document.all)
    setTimeout("slideit()",speed*1000+3000)
    else
    setTimeout("slideit()",speed*1000)
    }
    function slidelink(){
    if (whichimage==1)
    window.location="link1.htm"
    else if (whichimage==2)
    window.location="link2.htm"
    else if (whichimage==3)
    window.location="link3.htm"
    }
    //-->
    </script>

    <p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
    <a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>

    http://www.dynamicdrive.com/dynamicindex14/image4.htm

    Thanks for any help you can offer.

  • #2
    Yes - i am a dork. I just changed the a href reference to the site i wanted with a target=_blank instead of trying to change it in the java script. much easier. sorry to take up forum space by being a dork.

    Comment


    • #3
      if you don't know the answer it's not a stupid question.

      Comment

      Working...
      X