View Full Version : scrolling iframe with mouseover

01-28-2005, 07:49 PM
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.

<script language="javascript">
function up(){

function down(){
parent.left.window.scrollBy(0, 10)

function stopme(){
// -->

And these are the images

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

01-29-2005, 12:55 AM
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.

01-29-2005, 03:13 AM
I understand the issues of accessibility, but aside from that is there a way to achieve the function I described above?

01-29-2005, 03:23 AM
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

01-29-2005, 03:44 AM
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.