I tried changing from:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I get no errors on validation and IE6 goes into strict mode. But now Mozilla 1.0 won't read the function below and IE6 won't if it's called from:
onresize = function() {
DockToMenu();
}
But IE6 does work onresize if the window is small enough to activate the function from:
onload = function() {
DockToMenu();
}
The function is called from the page like this:
<script type="text/javascript" src="docs/Scripts.js"></script>
And from "Scripts.js" like this:
if (typeof document.getElementById!="undefined"&&typeof window.opera=="undefined") {
document.write('<\script src="docs/Scripts_DOM.js" type="text/javas\cript"></s\cript>');
} else {
}
Is the syntax incorrect in this function or is there something else I should be changing? Also, will IE5.5 be able to render the changes?
This function is in "Scripts_DOM.js"
function DockToMenu() {
var TopOfMenu = document.getElementById('Menu').offsetTop;
var HeightOfMenu = document.getElementById('Menu').scrollHeight+30;
var AvailableWindow = document.body.clientHeight;
var BottomOfMenu = TopOfMenu+HeightOfMenu;
if (AvailableWindow <= BottomOfMenu+3) {
document.getElementById('Info').style.top = BottomOfMenu-90;
} else if (AvailableWindow > BottomOfMenu+4) {
document.getElementById("Info").style.top = "";
document.getElementById("Info").style.bottom = '0px';
}
}
Thanks for your help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I get no errors on validation and IE6 goes into strict mode. But now Mozilla 1.0 won't read the function below and IE6 won't if it's called from:
onresize = function() {
DockToMenu();
}
But IE6 does work onresize if the window is small enough to activate the function from:
onload = function() {
DockToMenu();
}
The function is called from the page like this:
<script type="text/javascript" src="docs/Scripts.js"></script>
And from "Scripts.js" like this:
if (typeof document.getElementById!="undefined"&&typeof window.opera=="undefined") {
document.write('<\script src="docs/Scripts_DOM.js" type="text/javas\cript"></s\cript>');
} else {
}
Is the syntax incorrect in this function or is there something else I should be changing? Also, will IE5.5 be able to render the changes?
This function is in "Scripts_DOM.js"
function DockToMenu() {
var TopOfMenu = document.getElementById('Menu').offsetTop;
var HeightOfMenu = document.getElementById('Menu').scrollHeight+30;
var AvailableWindow = document.body.clientHeight;
var BottomOfMenu = TopOfMenu+HeightOfMenu;
if (AvailableWindow <= BottomOfMenu+3) {
document.getElementById('Info').style.top = BottomOfMenu-90;
} else if (AvailableWindow > BottomOfMenu+4) {
document.getElementById("Info").style.top = "";
document.getElementById("Info").style.bottom = '0px';
}
}
Thanks for your help.
Comment