Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question scrolling iframe with mouseover

    I am making a website for my band. It's is almost done except for the scrolling in the iframes. I didn't like the ugly scrollbars because I use Firefox and they can't be customized with FF. So instead of scrollbars, I am using a script which scrolls the iframe using onmouseover/onmouseout when you hover over a link/image.

    This is at the bottom of my index.htm, right before the closing body tag.
    Code:
    <script language="javascript">
    <!--
    upme=""
    downme=""
    function up(){
    parent.left.window.scrollBy(0,-10)
    upme=setTimeout("up()",100)
    }
    
    function down(){
    parent.left.window.scrollBy(0, 10)
    downme=setTimeout("down()",100)
    }
    
    function stopme(){
    clearTimeout(upme)
    clearTimeout(downme)
    }
    // -->
    </script>
    And these are the images
    Code:
    <img src="images/up.gif" height="25" width="25" border="0" onmouseover="up()" onmouseout="stopme()" hspace="0" vspace="0">
    
    <img src="images/down.gif" height="25" width="25" border="0" onmouseover="down()" onmouseout="stopme()" hspace="0" vspace="0">
    However, the problem is that when I try to scroll one window, they both scroll. I want to scroll two iframes independent of eachother; I.E. scroll the left iframe with own up/down images (like it is now) and scroll the right iframe seperately with its own up/down images.

    Does anyone know of a way to make the scripts in the left/right iframes unique of one-another so they scroll seperately? Or maybe a way to target the left/right irames seperately?

    The website is http://winterofdiscontent.web1000.com

    Thanks in advance for any contributions.
    Last edited by h3ad8ang3r; 01-28-2005 at 07:00 PM.

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any contributions? Ok. IMO, the problem with scripted scrolling is that unless all functionality of the system scrollbar is duplicated, it will be a useability problem for some, if not most/all, visitors.
    *this message will self destruct in n-seconds*

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I understand the issues of accessibility, but aside from that is there a way to achieve the function I described above?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    i dont see where it scrolls two iframes it seems to only scroll the iframe that contains the main content which is what i think u wanted, i tried it out in both IE and FF and both worked fine

  • #5
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have two drafts of my index.html, the one that is up now, and the one where I'm trying to scroll the two seperate iframes. I just put up the one now until I can find a way to get the other one to work.


  •  

    Posting Permissions

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