Connecting Tech Pros Worldwide Forums | Help | Site Map

Vertical Scrollbar Disappears in FireFox

Newbie
 
Join Date: May 2009
Posts: 19
#1: Jun 29 '09
I am running this: http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm

It works fine except the vertical scrollbar disappears when the image is clicked.

What should I do?

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#2: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


Which vertical scrollbar? Is this on the linked page or in your code?
Newbie
 
Join Date: May 2009
Posts: 19
#3: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


When i run the code - the scrollbar disappears in the page im running the code in.
Newbie
 
Join Date: May 2009
Posts: 19
#4: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


BTW - it works fine when run in a empty website - but if i run ti in a page with other scripts it makes the vertical scrollbar disappaear. any ideas why?
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#5: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


Without your code, I couldn't say.
Newbie
 
Join Date: May 2009
Posts: 19
#6: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


Would you like me to post the HTML code?
Newbie
 
Join Date: May 2009
Posts: 19
#7: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


If I add these scripts to the page then it goes wrong:

Expand|Select|Wrap|Line Numbers
  1.        <script id="1" type="text/javascript" src="js/jquery.js"></script>
  2.  
  3.         <script id="2" type="text/javascript" src="js/interface.js"></script>
  4.  
  5.         <style type="text/css">
  6.             a.active {
  7.                 font-weight: bold;
  8.             }
  9.             div.inactive {
  10.                 display: none;
  11.             }
  12.         </style>
  13.  
  14.         <link href="style.css" rel="stylesheet" type="text/css" />
  15.  
  16.         <script id="3" type="text/javascript" src="searchPage.js"></script>
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#8: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


All of the relevant code, but if it's quite a bit, either post a link or upload/attach the file(s) here.
Newbie
 
Join Date: May 2009
Posts: 19
#9: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


I just tested it out. The conflict is with a dock menu's interface.js that I've been using:

http://www.ndesign-studio.com/blog/mac/css-dock-menu

If I add <script id="2" type="text/javascript" src="js/interface.js"></script>

then the scrollbar doesnt work.
Newbie
 
Join Date: May 2009
Posts: 19
#10: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


It might be something to do with this function in scrolltopcontrol.js

Expand|Select|Wrap|Line Numbers
  1.     scrollup:function(){
  2.         if (!this.cssfixedsupport) //if control is positioned using JavaScript
  3.             this.$control.css({opacity:0}) //hide control immediately after clicking it
  4.         var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)
  5.         if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists
  6.             dest=jQuery('#'+dest).offset().top
  7.         else
  8.             dest=0
  9.         this.$body.animate({scrollTop: dest}, this.setting.scrollduration);
  10.     },
I think maybe when it checks to see if control is positioned using javascript - it finds that the scrollbar fits the description.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#11: Jun 29 '09

re: Vertical Scrollbar Disappears in FireFox


It may well be, but I would need to see it in action via a link or the actual code uploaded.

Please use [code] tags when posting code. Thanks.
Reply