Wives!
I am looking for the same thing. Not for my wife though (thank God)
I've been trying to do it with a div but your iframe technique looked
interesting and I semi-accomplished horizontal scrolling by making the
follwing changes.
First of all you have to reverse the co-ordinates in both scrollBy()
calls;
in the startScroll function, change "scrollBy(12,0)" to
"scrollBy(0,12)"
and
in the back function change, "scrollBy(-12,0);" to "scrollBy(0,-12);"
Then where the pictures are being added, I removed the <br /tags
after every thumbnail.
Now here's where it all goes sour. Even though I removed the <br />
tags after each thumbnail, the iframe still displays the thumbnails
vertically (the next thumbnail is displayed below the previous one -
not beside it). I am thouroughly embarrased to report that the only
way i can get around this is to use a table... So I drop a table
opener and closer in with the iframe's body tags then surround each
thumbnail with column tags (<tr>thumb</td>).
If anyone knows CSS to make images display horizontally inline within a
narrow div or iframe, please step forward...
Here is my version:
<html>
<head>
</head>
<body>
<script language='javascript' type='text/javascript'>
var scrolling;
function startScroll(theframe){
scrolling=setInterval('window.' + theframe + '.scrollBy(12,0);', 100);
}
function stopScroll(){
clearInterval(scrolling);
}
function back(theframe){
scrolling=setInterval('window.' + theframe + '.scrollBy(-12,0);',
100);
}
</script>
<a href='javscript:void(0);' onmouseover='back("this_iframe")'
onmouseout='stopScroll()'>Scroll Up</a>
<br />
<iframe src='' name='this_iframe' id='this_iframe' style='width: 50px;
height: 50px;' frameborder='0' scrolling='no'/>
</iframe><br />
<a href='javascript
:void(0);' onmouseover='startScroll("this_iframe")'
onmouseout='stopScroll()'>Scroll Down</a><br />
<script language='JavaScript' type='text/javascript'>
frames['this_iframe'].document.open();
frames['this_iframe'].document.write("<html><head><body><TABLE><TR>");
frames['this_iframe'].document.write("<TD><img src='image1.jpg'
style='width: 25px; height: 25px;'></TD>");
frames['this_iframe'].document.write("<TD><img src='image2.jpg'
style='width: 25px; height: 25px;'></TD>");
frames['this_iframe'].document.write("</TR></TABLE></body></html>");
frames['this_iframe'].document.close();
</script>
</body>
</html>
--
Dan
Visit
http://www.hostingforum.ca today