...

View Full Version : scrolling iframe with mouseover



h3ad8ang3r
01-28-2005, 06: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">
<!--
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


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

codegoboom
01-28-2005, 11:55 PM
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.

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

_Aerospace_Eng_
01-29-2005, 02: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

h3ad8ang3r
01-29-2005, 02: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum