Welcome to WebmasterWorld Guest from 54.158.228.55

Forum Moderators: open

Message Too Old, No Replies

Mozilla and Opera: no document.getElementById('dirsub').doScroll('scro

I want to set the scroll bar position, but it works only in MSIE

     
4:51 am on May 29, 2005 (gmt 0)

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



<body onload=do_scroll>

<div style=overflow:auto;width:150;height:150>
Here goes a long menu

Much down the menu, there is the current page
high lighted
</div>

<script>
function do_scroll
{
for(i=0;i<15;i++){document.getElementById('dirsub').doScroll('scrollbarDown')}

}
</script>

It works fine in MSIE,
I can test it in MSIE also by the command line

javascript:document.getElementById('dirsub').doScroll('scrollbarDown')

but it does not work in Opera 7 and Mozilla 1.7.6

Any idea to make it work in Opera and Mozilla?

9:05 pm on May 29, 2005 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



doScroll is a proprietary Microsoft method for their jscript - it's not part of the current ECMAscript standard, so for now, you only have IE support here.

[msdn.microsoft.com...]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month