View Full Version : problem with scrollbar

09-13-2008, 01:53 PM
Can any one help to add scrollbar with menu using java script?Infect i added all the code but its working in firefox and in any other browser but not in internet explorer :mad:

Here is the code i am using
function initScrollLayer() {
var navWin = document.getElementById('lnavwin');
if (navWin != null && navWin != 'undefined' )
if (navWin.addEventListener)
navWin.addEventListener('DOMMouseScroll', lmWheel, false);
var dataLayer = getLayerName(currentSection);
if (dataLayer!='lnav-data') document.getElementById('lnav-data').style.visibility='hidden';
var wndo = new dw_scrollObj('lnavwin', dataLayer);
wndo.bSizeDragBar = false;
wndo.setUpScrollbar("dragBar1", "track1", "v", 1, 0);

dw_scrollObj.scrollTo('lnavwin', 0, scrollTo, 1);


you can also check the live page


am waiting for response ..


09-13-2008, 02:59 PM
IE doesn't have addEventListener or DOMMouseScroll. Your function lmWheel at least looks like it attempts to be cross browser, so all you may have to do is:

if (navWin.addEventListener)
navWin.addEventListener('DOMMouseScroll', lmWheel, false);
else if (navWin.attachEvent)
navWin.attachEvent('onmousewheel', lmWheel);

There could also be other problems.

09-13-2008, 03:13 PM
this change didnt fix the problem.....can you tell me what other problems could b there?

09-13-2008, 03:25 PM
You have too many other scripts on the page, and several script errors that may or may not be related. If you setup a demo page with only the code for the scrolling menu on it, I'll troubleshoot that.

09-14-2008, 08:10 PM
When i use the code only for menu..its work fine both in IE or in FF..here is the lnk for tht page.


but when i integrate it with the other html and java script..scroll bar is not working in IE.:(:(....

here is the link for tht page..


please if you can help me..i will b very thankful to you.:)..

am waiting for your reply.