Why document.body.scrollTop isn´t working in IE6 ?

M

MadMad

I don´t know what is happening this property was functioning but
suddenly it begin to return 0 even when the scroll moves...

document.body.scrollTop

can anyone help me i think it have something with CSS Scroll
styles ????
 
R

Richard Cornford

MadMad said:
I don´t know what is happening this property was functioning but
suddenly it begin to return 0 even when the scroll moves...

can anyone help me i think it have something with CSS Scroll
styles ????

Without code the best you will get is a guess. My guess is that you
added or modified a DOCTYPE declaration to your HTML and switched it
from "quirks" mode into "CSS1Compat" mode. IE then switched the 'root'
node from the body element to the html element (documentElement), which
is now the element that will present actual scrolling values.

Richard.
 
M

MadMad

Without code the best you will get is a guess. My guess is that you
added or modified a DOCTYPE declaration to your HTML and switched it
from "quirks" mode into "CSS1Compat" mode. IE then switched the 'root'
node from the body element to the html element (documentElement), which
is now the element that will present actual scrolling values.

Richard.

Hi this is the Code of my js file...

var _divMensaje = null;
var _divCallBack = null;
function myOnScroll() {
if(_divMensaje){
_divMensaje.style.top = getYOffset();
}

if (_divCallBack){
_divCallBack.style.top=getYOffset();
}
}
window.onscroll = myOnScroll;

And the head of my HTML page is:
-------------------------------------------------------------------------------------------------------



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="ctl00_Head1"><title>
Untitled Page
</title><link href="App_Themes/Tema1/Style.css" rel="stylesheet"
type="text/css" /><style type="text/css">
.ctl00_mnuPrincipal_0 { background-
color:white;visibility:hidden;display:none;position:absolute;left:
0px;top:0px; }
.ctl00_mnuPrincipal_1 { text-decoration:none; }
.ctl00_mnuPrincipal_2 { }
.ctl00_mnuPrincipal_3 { color:Red;font-family:Tahoma;font-size:
12px;font-weight:bold; }
.ctl00_mnuPrincipal_4 { height:35px;padding:0px 5px 0px 5px; }
.ctl00_mnuPrincipal_5 { color:White;font-family:Tahoma;font-size:
12px; }
.ctl00_mnuPrincipal_6 { background-color:#676E71;border-
color:#CCCCCC;border-width:1px;border-style:solid;height:25px; }
.ctl00_mnuPrincipal_7 { color:#676E71; }
.ctl00_mnuPrincipal_8 { color:#676E71;height:35px; }
.ctl00_mnuPrincipal_9 { color:#FFF000; }
.ctl00_mnuPrincipal_10 { color:#FFF000;height:25px; }
.ctl00_mnuSecundario_0 { background-
color:white;visibility:hidden;display:none;position:absolute;left:
0px;top:0px; }
.ctl00_mnuSecundario_1 { text-decoration:none; }
.ctl00_mnuSecundario_2 { width:177px; }
.ctl00_mnuSecundario_3 { color:#003173;font-family:Tahoma;font-size:
11px; }
.ctl00_mnuSecundario_4 { height:35px; }

</style></head>
<body>
<form name="aspnetForm" method="post" action="zEduardoOrganismo.aspx"
onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top