PDA

View Full Version : Help needed with iFrame scroller!



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

cr3ative
10-31-2004, 05:52 AM
You've already had this answered.

http://www.dynamicdrive.com/forums/showthread.php?t=183

cr3ative

Chin-Tok
10-31-2004, 09:31 PM
You've already had this answered.

http://www.dynamicdrive.com/forums/showthread.php?t=183

cr3ative


Srry but that isnt true, if you'd check this is a question about a different iFrams scroller, this one has buttons, while my previous question was about the automatic scroller!