Example top page:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<!-- Scrollable iframe script- By Dynamic Drive -->
<!-- For original full source code and more DHTML scripts, visit http://www.dynamicdrive.com -->
<!-- This credit MUST stay intact for use -->
<!-- Modified in http://www.dynamicdrive.com/forums by jscheuer1 for right/left action -->
<iframe id="datamain" src="external.htm" width="300" height="23" frameborder="1" scrolling="no"></iframe>
<layer visibility=hide>
<div style="width:300px;" align="center">
<div style="float:left;"><a style="text-decoration:none;" href="#" onMouseover="scrollspeed=2" onMouseout="scrollspeed=0">< <u>Left</u></a></div><div style="float:right;"><a style="text-decoration:none;" href="#" onMouseover="scrollspeed=-2" onMouseout="scrollspeed=0"><u>Right</u> ></a></div> | <div style="clear:both;"></div>
</div>
</layer>
<!-- End Scrollable iframe -->
</body>
</html>
Example external.htm:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
margin:0;
padding:0;
}
</style>
</head>
<body>
<nobr id="content">A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. A long unbroken train of text and/or images. </nobr>
<!--DO NOT REMOVE BELOW SCRIPT. IT SHOULD ALWAYS APPEAR AT THE VERY END OF YOUR CONTENT-->
<script type="text/javascript">
//Scrollable content III- By http://www.dynamicdrive.com
//Modified here by jscheuer1 in http://www.dynamicdrive.com/forums
//for right/left action
var speed, currentpos=curpos1=0,alt=1,curpos2=-1
function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
var cent=document.getElementById('content').offsetWidth/2
function scrollwindow(){
temp=window.pageXOffset? window.pageXOffset : iecompattest().scrollLeft
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp
window.scrollBy(speed, 0)
}
onload=function(){
window.scrollBy(cent,0);
setInterval("initialize()",10);
}
</script>
</body>
</html>
Bookmarks