Results 1 to 5 of 5

Thread: IFRAME Scroller

  1. #1
    Join Date
    Aug 2006
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default IFRAME Scroller

    I have this code installed at www.allneedzrental.com/new and the text from the file is appearing but won't scroll??? All I changed in the code was the name of the external file.

    Also, how do you change the font colors, etc.?

    Thanks in advance.

  2. #2
    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

    That's your problem then. You need to use the supplied external.htm. You can edit its content to your own but, the layout, page code, and script on it are required.
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2006
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I changed the name of the file to update.htm and I'll attach it. I'm not sure what you mean by "the layout, page code, and script on it are required."???

  4. #4
    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

    Here is your update.htm:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="file:///C|/1PAGES/Murray%20Wilton%20Ministries/default.css" rel="stylesheet" type="text/css">
    </head>
    
    <body>
    <p align="center" class="content">Please visit Panoply this weekend to see all 
    the outstanding tents we have put there for you to enjoy.</p>
    <p align="center" class="content">All Needz Rental stands ready to provide all 
    your Rental Products for your upcoming Wedding.</p>
    </body>
    </html>
    It is just an ordinary page, here is the external.htm that you should use:

    Code:
    <html>
    <body>
    
    <div id="datacontainer" 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>
    
    <!-- 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.all? document.all.datacontainer : document.getElementById("datacontainer")
    dataobj.style.top="5px"
    setTimeout("getdataheight()", initialdelay)
    }
    
    function getdataheight(){
    thelength=dataobj.offsetHeight
    if (thelength==0)
    setTimeout("getdataheight()",10)
    else
    scrollDiv()
    }
    
    function scrollDiv(){
    dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed+"px"
    if (parseInt(dataobj.style.top)<thelength*(-1))
    dataobj.style.top="5px"
    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>
    See the difference? You can change its name and edit its content but, the rest must remain 'as is'.
    - John
    ________________________

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

  5. #5
    Join Date
    Aug 2006
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much, I get it now! What confused me was I used another of DD's scrollers and didn't have to have all that code around the include file.

    I appreciate it - it's working now.

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
  •