[Javascript] scrolling div problem in Safari

Rajesh S. Ghanekar rajesh_ghanekar at persistent.co.in
Thu Mar 31 01:45:31 CST 2005


Hi,
 
   I have a frame in html  page. It contains several div's (<div>).
The problem I am facing is even though I set height or offsetHeight
the scrolling bar doesn't scroll to the new offset. This problem is
only with Safari.

Safari version: 1.2.4.

  The problem I am fixing is that the following code works in IE, but
not in Safari:

var t_el = doc.getElementById('top');   // 'top' is a div
var m_el = doc.getElementById('msgs');  // 'msgs' id also a div
if (!IS_NULL(m_el) && !IS_NULL(t_el)) {
       m_el.style.height = (this.toc.frameheight() - t_el.scrollHeight) 
+ 'px';
       m_el.style.offsetHeight =  (this.toc.frameheight() - 
t_el.scrollHeight) + 'px';
}

I have seen several threads in google saying that this problem persists 
in Safari for
long. Is there any solution to this??? How can i move the scrollbar with 
scrollpane
to the desired position? Thanks for any suggestions and help.

- Rajesh



More information about the Javascript mailing list