Hepple
01-30-2007, 01:11 AM
1) Script Title: Scrollable IFRAME
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/iframescroll.htm
3) Website with problem: http://www.callus.cc/v2
3) Describe problem: My problem is that the following JavaScript ...
<script language="JavaScript1.2">
//Scrollable content III- By http://www.dynamicdrive.com
var speed, currentpos=curpos1=0,alt=1,curpos2=-1
function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}
function scrollwindow(){
temp=(document.all)? document.body.scrollTop : window.pageYOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp
window.scrollBy(0,speed)
}
setInterval("initialize()",10)
</script>
... does't like to be on the same page as my PHP script. In the installation instructions it says "Insert the below script in the page being loaded in the iframe, at the very end of the document source", which for me happens to be dynamic PHP.
It works perfectly in Firefox but I get an error in IE saying "Error: Object required.". Sometimes it does actually work in IE, it kinda chooses to work when it wants to.
Maybe someone could update the JavaScript for me? Thanks!
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/iframescroll.htm
3) Website with problem: http://www.callus.cc/v2
3) Describe problem: My problem is that the following JavaScript ...
<script language="JavaScript1.2">
//Scrollable content III- By http://www.dynamicdrive.com
var speed, currentpos=curpos1=0,alt=1,curpos2=-1
function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}
function scrollwindow(){
temp=(document.all)? document.body.scrollTop : window.pageYOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp
window.scrollBy(0,speed)
}
setInterval("initialize()",10)
</script>
... does't like to be on the same page as my PHP script. In the installation instructions it says "Insert the below script in the page being loaded in the iframe, at the very end of the document source", which for me happens to be dynamic PHP.
It works perfectly in Firefox but I get an error in IE saying "Error: Object required.". Sometimes it does actually work in IE, it kinda chooses to work when it wants to.
Maybe someone could update the JavaScript for me? Thanks!