Results 1 to 10 of 10

Thread: IFRAME scroller - No breaks

  1. #1
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default IFRAME scroller - No breaks

    1) Script Title: IFRAME scroller

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...e-scroller.htm

    3) Describe problem: Is there a way that I can make it without whitespace from the last item to the first item? A constent scrolling with no breaks. Thank you.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    There's no easy way to do this at the moment unfortunately.
    DD Admin

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You may want to consider switching to:

    http://home.comcast.net/~jscheuer1/side/marquee.htm

    Use your browser's 'view source' to get the code.

    Any questions, feel free to ask.
    - John
    ________________________

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

  4. #4
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    or

    Code:
    <html>
    <body>
    
    <div  style="position:absolute;left:1px;top:10px;width:100%" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">
    
    <!-- ADD YOUR SCROLLER CONTENT INSIDE HERE -->
    
    <b>What's Hot</b></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex9/encrypter.htm" target="_top">Source
    code encrypter</a>&nbsp;</small></font></strong><br>
    <font face="Verdana" size="2">Scramble the source of any chunk of code using
    this unique script.</font></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex5/flashlink.htm" target="_top">Flashing
    links</a>&nbsp;</small></font></strong><br>
    <font face="Verdana"><small>Bring attention to special links, by making them
    flash!</small></font></p>
    
    <p align="left"><small><strong><font face="Verdana"><a href="http://www.dynamicdrive.com/dynamicindex13/roamcursor.htm" target="_top">Roaming
    Cursor</a>&nbsp;</font></strong></small><br>
    <small><font face="Verdana">Display a second, &quot;roaming&quot; cursor on your
    page with this fun animation script.</font></small></p>
    <p align="left"><font face="Verdana"><strong><a href="http://www.dynamicdrive.com/dynamicindex11/animatedtitle.htm" target="_top"><small>Animated
    Document title</small></a><br>
    </strong><small>Animate into view your document's title!</small></font>
    <br />
    <br />
    <!-- END SCROLLER CONTENT -->
    
    </div>
    
    <script type="text/javascript">
    
    /***********************************************
    * IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    //Specify speed of scroll. Larger=faster (ie: 5)
    var scrollspeed=cache=2
    
    //Specify intial delay before scroller starts scrolling (in miliseconds):
    var initialdelay=500
    
    function initializeScroller(){
    dataobj=[document.getElementsByTagName('DIV')[0]];
    dataobj[0].style.top="5px"
    setTimeout("getdataheight()", initialdelay)
    }
    
    function getdataheight(){
    thelength=dataobj[0].offsetHeight
    if (thelength==0)
    setTimeout("getdataheight()",10)
    else
     dataobj[1]=dataobj[0].cloneNode(true);
     dataobj[1].style.top=thelength+5+'px';
     document.body.appendChild(dataobj[1]);
     scrollDiv()
    }
    
    function scrollDiv(){
     for (var z0=0;z0<dataobj.length;z0++){
      dataobj[z0].style.top=parseInt(dataobj[z0].style.top)-scrollspeed+"px"
      if (parseInt(dataobj[z0].style.top)<thelength*(-1))
      dataobj[z0].style.top=parseInt(dataobj[z0].style.top)+thelength*2+"px"
     }
    setTimeout("scrollDiv()",40);
    }
    
    if (window.addEventListener)
    window.addEventListener("load", initializeScroller, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initializeScroller)
    else
    window.onload=initializeScroller
    
    
    </script>
    
    </body>
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  5. #5
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by vwphillips View Post
    or

    Code:
    <html>
    <body>
    
    <div  style="position:absolute;left:1px;top:10px;width:100%" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">
    
    <!-- ADD YOUR SCROLLER CONTENT INSIDE HERE -->
    
    <b>What's Hot</b></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex9/encrypter.htm" target="_top">Source
    code encrypter</a>&nbsp;</small></font></strong><br>
    <font face="Verdana" size="2">Scramble the source of any chunk of code using
    this unique script.</font></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex5/flashlink.htm" target="_top">Flashing
    links</a>&nbsp;</small></font></strong><br>
    <font face="Verdana"><small>Bring attention to special links, by making them
    flash!</small></font></p>
    
    <p align="left"><small><strong><font face="Verdana"><a href="http://www.dynamicdrive.com/dynamicindex13/roamcursor.htm" target="_top">Roaming
    Cursor</a>&nbsp;</font></strong></small><br>
    <small><font face="Verdana">Display a second, &quot;roaming&quot; cursor on your
    page with this fun animation script.</font></small></p>
    <p align="left"><font face="Verdana"><strong><a href="http://www.dynamicdrive.com/dynamicindex11/animatedtitle.htm" target="_top"><small>Animated
    Document title</small></a><br>
    </strong><small>Animate into view your document's title!</small></font>
    <br />
    <br />
    <!-- END SCROLLER CONTENT -->
    
    </div>
    
    <script type="text/javascript">
    
    /***********************************************
    * IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    //Specify speed of scroll. Larger=faster (ie: 5)
    var scrollspeed=cache=2
    
    //Specify intial delay before scroller starts scrolling (in miliseconds):
    var initialdelay=500
    
    function initializeScroller(){
    dataobj=[document.getElementsByTagName('DIV')[0]];
    dataobj[0].style.top="5px"
    setTimeout("getdataheight()", initialdelay)
    }
    
    function getdataheight(){
    thelength=dataobj[0].offsetHeight
    if (thelength==0)
    setTimeout("getdataheight()",10)
    else
     dataobj[1]=dataobj[0].cloneNode(true);
     dataobj[1].style.top=thelength+5+'px';
     document.body.appendChild(dataobj[1]);
     scrollDiv()
    }
    
    function scrollDiv(){
     for (var z0=0;z0<dataobj.length;z0++){
      dataobj[z0].style.top=parseInt(dataobj[z0].style.top)-scrollspeed+"px"
      if (parseInt(dataobj[z0].style.top)<thelength*(-1))
      dataobj[z0].style.top=parseInt(dataobj[z0].style.top)+thelength*2+"px"
     }
    setTimeout("scrollDiv()",40);
    }
    
    if (window.addEventListener)
    window.addEventListener("load", initializeScroller, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initializeScroller)
    else
    window.onload=initializeScroller
    
    
    </script>
    
    </body>
    </html>
    Thanks.

    How can I close the gap... just a bit more?

  6. #6
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    there is no gap, the content div is duplicated and both are scrolled.

    for no gap the original div content height must be greater than the the parent div height by duplicating the HTML within the Div.

    Code:
    <html>
    <body>
    
    <div  style="position:absolute;left:1px;top:10px;width:100%;" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">
    
    <!-- ADD YOUR SCROLLER CONTENT INSIDE HERE -->
    
    <b>What's Hot</b></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex9/encrypter.htm" target="_top">Source
    code encrypter</a>&nbsp;</small></font></strong><br>
    <font face="Verdana" size="2">Scramble the source of any chunk of code using
    this unique script.</font></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex5/flashlink.htm" target="_top">Flashing
    links</a>&nbsp;</small></font></strong><br>
    <font face="Verdana"><small>Bring attention to special links, by making them
    flash!</small></font></p>
    
    <p align="left"><small><strong><font face="Verdana"><a href="http://www.dynamicdrive.com/dynamicindex13/roamcursor.htm" target="_top">Roaming
    Cursor</a>&nbsp;</font></strong></small><br>
    <small><font face="Verdana">Display a second, &quot;roaming&quot; cursor on your
    page with this fun animation script.</font></small></p>
    <p align="left"><font face="Verdana"><strong><a href="http://www.dynamicdrive.com/dynamicindex11/animatedtitle.htm" target="_top"><small>Animated
    Document title</small></a><br>
    </strong><small>Animate into view your document's title!</small></font>
    <br />
    <br />
    <b>What's Hot</b></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex9/encrypter.htm" target="_top">Source
    code encrypter</a>&nbsp;</small></font></strong><br>
    <font face="Verdana" size="2">Scramble the source of any chunk of code using
    this unique script.</font></p>
    <p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex5/flashlink.htm" target="_top">Flashing
    links</a>&nbsp;</small></font></strong><br>
    <font face="Verdana"><small>Bring attention to special links, by making them
    flash!</small></font></p>
    
    <p align="left"><small><strong><font face="Verdana"><a href="http://www.dynamicdrive.com/dynamicindex13/roamcursor.htm" target="_top">Roaming
    Cursor</a>&nbsp;</font></strong></small><br>
    <small><font face="Verdana">Display a second, &quot;roaming&quot; cursor on your
    page with this fun animation script.</font></small></p>
    <p align="left"><font face="Verdana"><strong><a href="http://www.dynamicdrive.com/dynamicindex11/animatedtitle.htm" target="_top"><small>Animated
    Document title</small></a><br>
    </strong><small>Animate into view your document's title!</small></font>
    <br />
    <br />
    <!-- END SCROLLER CONTENT -->
    
    </div>
    
    <script type="text/javascript">
    
    /***********************************************
    * IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    //Specify speed of scroll. Larger=faster (ie: 5)
    var scrollspeed=cache=2
    
    //Specify intial delay before scroller starts scrolling (in miliseconds):
    var initialdelay=500
    
    function initializeScroller(){
    dataobj=[document.getElementsByTagName('DIV')[0]];
    dataobj[0].style.top="5px"
    setTimeout("getdataheight()", initialdelay)
    }
    
    function getdataheight(){
    thelength=dataobj[0].offsetHeight
    if (thelength==0)
    setTimeout("getdataheight()",10)
    else
     dataobj[1]=dataobj[0].cloneNode(true);
     dataobj[1].style.top=thelength+5+'px';
     document.body.appendChild(dataobj[1]);
     scrollDiv()
    }
    
    function scrollDiv(){
     for (var z0=0;z0<dataobj.length;z0++){
      dataobj[z0].style.top=parseInt(dataobj[z0].style.top)-scrollspeed+"px"
      if (parseInt(dataobj[z0].style.top)<thelength*(-1))
      dataobj[z0].style.top=parseInt(dataobj[z0].style.top)+thelength*2+"px"
     }
    setTimeout("scrollDiv()",40);
    }
    
    if (window.addEventListener)
    window.addEventListener("load", initializeScroller, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initializeScroller)
    else
    window.onload=initializeScroller
    
    
    </script>
    
    </body>
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  7. #7
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am using this Script here. So that is why I am posting it here.

    On some pages I get this message... "This program cannot display"

    Then on others it works well.

    Once I entered in basic code like this and it worked well.

    Ok I am having issues with this. With this code it works...

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    
    </head>
    <body>
    <SCRIPT type="text/javascript" src="http://www.infusionmg.com/MinnstarNetworksOnlineAd/scroll.js"></SCRIPT>
    </body>
    </html>
    On this it does not work. Can you help me out with this?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head> 
    <title></title> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
    <link rel="stylesheet" type="text/css" href="css/style.css" /> 
    <script language="JavaScript"> 
    function mdy(todaysdate) { 
    //calls the function mdy why to get our date 
    return todaysdate.getMonth()+1+"/"+todaysdate.getDate()+"/"+todaysdate.getYear() 
    } 
    </script> 
    </head> 
     
    <body> 
    <div id="wrapper"> 
    <div id="container"> 
      <div id="header"> 
        <div id="logo"><span></span></div> 
        <div id="primary_menu"> 
          <div id="pm_main"> 
            <ul> 
              <li><A href="index.html"><b>Home</b></A></li> 
              <li><A href="advertise.html"><b>Advertising Services</b></A></li> 
              <li class="active"><A href="online.html"><b>Online Ad Program</b></A></li> 
              <li><A href="privacy.html"><b>Privacy Policy</b></A></li> 
              <li><A href="contact.html"><b>Contact</b></A></li> 
            </ul> 
          </div> 
          <div id="pm_sub"> 
            <ul> 
              <li></li> 
            </ul> 
          </div> 
        </div> 
      </div> 
     
      <div id="conent"> 
        <div class="left_col"> 
          <div class="db1"> 
            <div class="db1_title"> 
              <h3>Online Program</h3> 
            </div> 
            <div class="db1_content"> 
              <div class="db1_container"> 
    <p> 
    <SCRIPT type="text/javascript" src="http://www.infusionmg.com/minnstarnetworksonlinead/scroll.js"></SCRIPT> 
    </p> 
              </div> 
            </div> 
          </div>    
        </div> 
     
    
      </div> 
    </div> 
    </div> 
     
    </body> 
    </html>

  8. #8
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Can anyone help with the one above? I need this by this afternoon. Thank you.

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by vbjohn View Post
    Can anyone help with the one above? I need this by this afternoon. Thank you.
    This is a help forum, not a job site. Most of us don't respond to deadlines, at least not here.

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    Did you try:

    http://www.dynamicdrive.com/forums/s...91&postcount=3?

    In any case, if you want it as fast as we can do it, we might need a link to your page:

    Please post a link to the page on your site that contains the problematic code so we can check it out.


    If I had to guess though, I'd say that the path to external.htm needs to be absolute:

    Code:
    var iframesrc="http://www.infusionmg.com/MinnstarNetworksOnlineAd/external.htm" 
    document.write('<iframe id="datamain" src="'+iframesrc+'" width="300px" height="250px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"></iframe>')
    Last edited by jscheuer1; 01-07-2010 at 03:42 PM. Reason: add info
    - John
    ________________________

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

  10. #10
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks. I will put those things back up for the credit.

Bookmarks

Posting Permissions

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