Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolldown with FireFox

Status
Not open for further replies.

Rodie

Programmer
Jun 27, 2004
132
FR
Hi all

I have a web page with an <iframe> called: myiframe
This frame contains a <div> called: mydiv

In a javascript function, I try to scrolldown the <div> like this:
Code:
oDiv = window.frames["myiframe"].document.getElementById("mydiv");
oDiv.scrollTop = oDiv.scrollHeight - oDiv.clientHeight;
This piece of code works fine with Internet Explorer. But with FireFox, the 2nd lines generates "sometimes" an error (everything is blocked, pending).

Someone has an idea ??
Thanks for your help
 
Problem solved:
actually, I should have encapsulate the second line in a try-catch because when the scrolldown is not necessary, it generates a blocking error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top