Chin-Tok
10-30-2004, 09:12 PM
Hiya,
I want to use the following script in a webpage I'm making. Iframe scroller (http://www.dynamicdrive.com/dynamicindex17/iframescroll.htm) But I want it to scroll horizontally instead of up/down.
The script for scrolling the window is as follows:
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)
}
I thought alterting it to the follwing would make it scroll horizontal, but no luck:
function scrollwindow(){
temp=(document.all)? document.body.scrollLeft : window.pageXOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp
window.scrollBy(0,speed)
}
Could someone please help me with this?! :confused: I'm not all to sure what I need to change.
My sincere thanx to anyone who helps out!
Chin-Tok
I want to use the following script in a webpage I'm making. Iframe scroller (http://www.dynamicdrive.com/dynamicindex17/iframescroll.htm) But I want it to scroll horizontally instead of up/down.
The script for scrolling the window is as follows:
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)
}
I thought alterting it to the follwing would make it scroll horizontal, but no luck:
function scrollwindow(){
temp=(document.all)? document.body.scrollLeft : window.pageXOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp
window.scrollBy(0,speed)
}
Could someone please help me with this?! :confused: I'm not all to sure what I need to change.
My sincere thanx to anyone who helps out!
Chin-Tok