Results 1 to 5 of 5

Thread: iFRAME Scroller

  1. #1
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down iFRAME Scroller

    1) Script Title: iFRAME SCROLLER

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

    3) Describe problem: Why does it stop scrolling?

    I put this into my webpage and it works fien witht he external.htm file suppiled but as soon as I start to edit external.hmt... it stops scrolling... I am not removing any html/javascript in external.htm.... please help because this scroller fits my bill perfectly!

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thetestingsite View Post
    Please post a link to the page on your site that contains the problematic script so we can check it out.

    http://www.somelad.co.uk/basecopy.htm

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    In your external.htm page, you need to place all of your contents within a div tag with the id of datacontainer. In short, your code should look like this (the highlighted parts are what I added):

    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1">
    <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
    <title></title>
    </head>
    
    <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 -->
    <p><b>What's Hot</b></p>
    
    <p><a href="http://www.siderodoromania.com"><b>Visit the railway
    site with real umph</b></a><b><br>
    </b>Siderodoromania, the obsession with steam locomotives site</p>
    
    <p><a href="http://www.somelad.co.uk"><strong>Some Lad</strong></a><strong><br>
    My own personal site</strong></p>
    
    <p align="left"><a
    href="http://www.dynamicdrive.com/dynamicindex9/encrypter.htm"
    target="_top"><font size="2" face="Verdana"><strong>Source code
    encrypter</strong></font></a><font size="2" face="Verdana"><strong>&nbsp;</strong></font><br>
    <font size="2" face="Verdana">Scramble the source of any chunk of
    code using this unique script.</font></p>
    
    <p align="left"><a href="http://www.toffeeweb.com"><strong>Evertonians
    at Toffeeweb</strong></a><strong><br>
    </strong>COYB</p>
    
    <p align="left"><a
    href="http://www.dynamicdrive.com/dynamicindex13/roamcursor.htm"
    target="_top"><font size="2" face="Verdana"><strong>Roaming
    Cursor</strong></font></a><font size="2" face="Verdana"><strong>&nbsp;</strong></font><br>
    
    <font size="2" face="Verdana">Display a second,
    &quot;roaming&quot; cursor on your page with this fun animation
    script.</font></p>
    
    <p align="left"><a
    href="http://www.dynamicdrive.com/dynamicindex11/animatedtitle.htm"
    target="_top"><font size="2" face="Verdana"><strong>Animated
    Document title</strong></font></a><strong><br>
    </strong><font size="2">Animate into view your document's title!</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> </p>
    </body>
    </html>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Brilliant... thanks very much.. all up and running 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
  •