473,586 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scrolling DIV's not working in Firefox!!!!

2 New Member
Hi All,

I need a scrolling DIV is a to display my dynamic tree in left frame.
In my jsp , Div overflow is set to "auto"
[HTML]<DIV id=divScroller style="overflow :auto;height:20 0px">
<!-- stuff goes here -->
</DIV
[/HTML]
I'm using beleow function to set the height ..

Expand|Select|Wrap|Line Numbers
  1. function resizeVerticalDiv(oDiv, oBottomNeighbor) {
  2.       var iMinHeight = 100;    //DIV won't get smaller than this
  3.       var iClientHeight = document.body.clientHeight;
  4.          //the browser's viewable area
  5.  
  6.       // find the absolute top coordinate
  7.       var iAbsoluteYTop = oDiv.offsetTop;
  8.       var oParent = oDiv.offsetParent;
  9.       while (oParent.tagName.toUpperCase()!= "BODY") {
  10.          iAbsoluteYTop += oParent.offsetTop;
  11.          oParent = oParent.offsetParent;
  12.       }
  13.  
  14.       // find the absolute bottom coordinate
  15.       var iAbsoluteYBottom;
  16.       if (oBottomNeighbor != null) {
  17.          var iNeighborTop = oBottomNeighbor.offsetTop;
  18.          oParent = oBottomNeighbor.offsetParent;
  19.          while (oParent.tagName.toUpperCase()!= "BODY") {
  20.             iNeighborTop += oParent.offsetTop;
  21.             oParent = oParent.offsetParent;
  22.          }
  23.          iAbsoluteYBottom = document.body.scrollHeight - iNeighborTop
  24.       } else {
  25.          iAbsoluteYBottom = 0
  26.       }
  27.  
  28.       var iNewHeight = document.body.clientHeight - iAbsoluteYTop -
  29.          iAbsoluteYBottom;
  30.       oDiv.style.posHeight = (iNewHeight >= iMinHeight ? iNewHeight :
  31.          iMinHeight);
  32.    }

Calling this fun ction on BODY onLoad and passing my scrolling DIV as the first argument and the ID of the first object below the DIV as the second argument.

This function is not working Firefox. In IE it's working fine.Can anyone please help me to solve this problem??

Thanks,
Geetha.
Jan 16 '08 #1
3 4169
acoder
16,027 Recognized Expert Moderator MVP
Calling this fun ction on BODY onLoad and passing my scrolling DIV as the first argument and the ID of the first object below the DIV as the second argument.
If you pass the ID of the object, it won't become an object unless you use document.getEle mentById(oBotto mNeighbor).
Jan 16 '08 #2
geetha v
2 New Member
If you pass the ID of the object, it won't become an object unless you use document.getEle mentById(oBotto mNeighbor).

Hi,

Solved pbm by adujusting the stlye property of <div> tag... :-)


Thanks,
Geetha.
Jan 18 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Glad you got it working. Post again if you have any more questions and hopefully someone should be around to answer them.
Jan 18 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2921
by: Hugh Dickinson | last post by:
Does anybody know whether the netscape 7+ browsers support afunction similar to the internet explorer doScroll() function, this has the effect of pressing the scrollbar button, but can be scripted allowing me to lose those horrible scrollbars. Regards Hugh Dickinson h.j.dickinson@dur.ac.uk
0
1855
by: nina | last post by:
Hi all, I've been working on a site that involves content in multiple scrolling DIVs on a page which is loaded inside multiple framesets. the layout is cramped as all hell but I'm not going to argue that with the client -- they def. want it to be structured this way. One DIV usually contains two "comparable" items between which the user...
8
5046
by: gpbmike | last post by:
I'm wondering if anyone else has had this problem before. Every now and then a div on my page will overlap with another. Thi only happens in firefox (vs. IE and Safari) and it corrects itself whe you refresh the page. Has anyone run into this before? Thanks -- gpbmik
1
4588
by: Mickey | last post by:
Hi, I have a script which works in both IE but is sluggish in Firefox. The script is a simple text scroller. It works perfectly in IE however in Firefox, the text scroll slower and eventually just stops. I would aprechiate it someone could look at the code below and maybe see where the problem is?
5
2193
by: gregmercer | last post by:
I have the following html sample, where I'd like to have a show and hide two divs, one replacing the other. Following these two divs is a third div (the bluediv) which I would like to have placed right up directly below to the first or second div, depending on which is showing. If you load the html in Firefox, and then click on the "Edit"...
5
8024
by: Spondishy | last post by:
Hi, I am using the following in my stylesheet to center divs in firefox. html>body { font-size: 13px; } div.centerdiv {
8
4792
by: knoxautoguy | last post by:
This problem has consumed a lot of my time, and I'm aftraid someone will tell me that my whole approach to this objective is wrong; however, I would like to know if there is a way to do this. I have a web page divided into two major segments, with the top segment fixed and the bottom segment allowed to scroll, thus giving the look of frames...
2
1638
by: Jan Doggen | last post by:
Hello, The following code displays the name for all three elements in IE, but fails for the1st and 3rd in Firefox. What could be going on? I tried SPAN instead of DIV doesn;t work either. (What I finally want is to set style.invisibility for the text in that DIV) TIA Jan
3
3437
by: AngryHank | last post by:
I am sure I am not typing the correct question in Google or this group to find the answer to my question. So, I have to ask. I have a scrolling div that I am changing text color and background color on a mouse over of a marker on a map. I also want the div with the proper ID to come to the viewable area of the scrolling div when I mouse...
0
7765
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet explorer but not on firefox. I dont want it to scroll sideways. in index.htm the iframe is at the bottom of the code. index.htm <!DOCTYPE...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.