Results 1 to 3 of 3

Thread: Fading Scroller Query

  1. #1
    Join Date
    Nov 2013
    Thanked 0 Times in 0 Posts

    Default Fading Scroller Query

    Fading scroller

    Just a quick question. I've been using the Fading Scroller for a while.
    I can add a image to the scroller, I can make it linkable, but how do I get the link for the image to open up in a new window?
    I've tried both target='_blank' and target='new' neither open in a new window. Does anyone know how or if this
    is possible with this script?

    Thanks - Southernwinds

    <script type="text/javascript">
    * Fading Scroller-  Dynamic Drive DHTML code library (
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at for full source code
    var delay = 15000; //set delay between message change (in miliseconds)
    var maxsteps=30; // number of steps to take to change from start color to endcolor
    var stepdelay=40; // time in miliseconds of a single step
    //**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
    var startcolor= new Array(255,255,255); // start color (red, green, blue)
    var endcolor=new Array(0,0,0); // end color (red, green, blue)
    ///Church Bullets Go Here/////////////////
    var fcontent=new Array();
    begintag='<div style="font: normal 14px Arial; padding: 5px;">'; //set opening tag, such as font declarations
    fcontent[0]="<b><font color='blue'>Memorial Service for Rev. Tom Adams</font><br><font color='purple'>Sunday November 17, 2013<br>Amite Baptist Church at 2:00 p.m.</font></b><br><hr><br>The family will receive guests at the church after the service. In lieu of flowers, Bro. Tom requests <font color='red'><b>donations to be made to Mission Dignity</b></font>.<br><br><a href=''><img src='./clipart/donate.png' width='100' height='100' target='_blank'></a><br><font color='blue'><b><i>Click Our Heart to Donate</i></b></font>";
    fcontent[1]="<b><font color='blue'>Ushers For The Week Of<br>November 17, 2013</font></b><br><hr><br><ul><li align='left'>Jeff Bennett</li><li align='left'>Greg Cowart</li><li align='left'>Bud Loper</li><li align='left'>Steve Webb</li><li align='left'>Ronnie McMorris</li><li align='left'>Garland Penton</li></ul><br><hr><b><font color='blue'>Deacon Of The Week For<br>November 17, 2013</font></b><ul><li align='left'>Jerry Woodward</li></ul>";
    fcontent[2]="<b><font color='blue'>Nursery Schedule For The Week Of<br>November 17, 2013</font></b><br><hr><ul><li align='left'>A.M. Service: Babies<br>Judy Wilson & Melanie Honeycutt</li><br><li align='left'>A.M. Service: Preschool<br>Beth & Pete Galliano</li><br><li align='left'>P.M. Service:<br>Amy & Chris Nickel</li></ul><br><hr><b><font color='blue'>Wednesday, November 13, 2013</font></b><ul><li align='left'>Donnis Loper</li></ul>";
    fcontent[3]="<b><font color='blue'>Church Security For<br>Wednesday, November 13, 2013</font></b><br><hr><br>David Marshall";
    fcontent[4]="<b><font color='blue'>PERSPECTIVE: A storm the size Typhoon Haiyan would nearly cover the U.S.</font><br><a href='wxtyphoon.php'><font color='red'>LATEST NEWS FEED - CLICK HERE!</font></a><br><br><img src='./clipart/typhoonusa.jpg' width='300' height='260'>";
    fcontent[5]="<b><font color='red'>WBC Website Special Bulletin</font></b><br><hr><b><font color='blue'>I have reconfigured the menu section, and added a few new areas.<br><br>But I need your help, in getting all the information corrected on the new pages.<br><br>Please send me any additions, omissions, corrections and information<br> to </font><a href=''></a><br><br><font color='blue'>Thank You Very Much!</font>";
    fcontent[6]="<b><font color='red'>WBC Website Special Bulletin</font></b><br><hr><b><font color='blue'>New Area has been added to the Media Center Section,</font> <font color='red'>The WBC Download Area</font>.<br><br>I have put all available Audio & Video files up for downloading.<br><br>All files are in ZIP Format. If you don't have WinZip it is also available for downloading.<br><br><b>Note: Some of the files are rather large, and will take some time to download from the site to your PC.</b><br><br>All Files should work with Windows Media Player.";
    var fwidth='320px'; //set scroller width
    var fheight='340px'; //set scroller height
    var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.
    ///No need to edit below this line/////////////////
    var ie4=document.all&&!document.getElementById;
    var DOM2=document.getElementById;
    var faderdelay=0;
    var index=0;
    /*Rafael Raposo edited function*/
    //function to change content
    function changecontent(){
      if (index>=fcontent.length)
      if (DOM2){
        document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
        if (fadelinks)
        colorfade(1, 15);
      else if (ie4)
    // colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
    // Modified by
    function linkcolorchange(step){
      var obj=document.getElementById("fscroller").getElementsByTagName("A");
      if (obj.length>0){
        for (i=0;i<obj.length;i++)
    /*Rafael Raposo edited function*/
    var fadecounter;
    function colorfade(step) {
      if(step<=maxsteps) {	
        if (fadelinks)
        document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
        setTimeout("changecontent()", delay);
    /*Rafael Raposo's new function*/
    function getstepcolor(step) {
      var diff
      var newcolor=new Array(3);
      for(var i=0;i<3;i++) {
        diff = (startcolor[i]-endcolor[i]);
        if(diff > 0) {
          newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
        } else {
          newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
      return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
    if (ie4||DOM2)
      document.write('<div id="fscroller" style="border:1px solid black;width:'+fwidth+';height:'+fheight+'"></div>');
    if (window.addEventListener)
    window.addEventListener("load", changecontent, false)
    else if (window.attachEvent)
    window.attachEvent("onload", changecontent)
    else if (document.getElementById)
    Last edited by Southernwinds; 11-15-2013 at 02:56 AM.

  2. #2
    Join Date
    Mar 2005
    Thanked 3,446 Times in 3,407 Posts
    Blog Entries


    In today's browsers, target='_blank' will almost always open a new tab. But it must be an attribute of the a tag. Here:

    <a href=''><img src='./clipart/donate.png' width='100' height='100' target='_blank'></a>
    it's an attribute of the img tag. It should go here:

    <a href='' target='_blank'><img src='./clipart/donate.png' width='100' height='100'></a>
    The browser cache may need to be cleared and/or the page refreshed to see changes.
    - John

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Southernwinds (11-15-2013)

  4. #3
    Join Date
    Nov 2013
    Thanked 0 Times in 0 Posts


    Thanks, for the help, yes, that fixed it. You're a life saver Mr. John.
    Thank you again!

Similar Threads

  1. Fading Message Scroller isn't fading all text content
    By rwilk in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 11-07-2008, 12:41 PM
  2. Fading Scroller
    By Bennysan in forum JavaScript
    Replies: 2
    Last Post: 03-27-2007, 09:29 AM
  3. Fading scroller not fading--quite
    By vrm in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 05-31-2006, 11:10 AM
  4. Fading scroller ?
    By CULLEN in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 04-05-2006, 07:12 PM
  5. Need Help with Fading scroller
    By drgrisanti in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 03-02-2006, 02:24 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts