olliepop
Member
- Messages
- 138
- Reaction score
- 0
- Points
- 16
Hi x10 programmers
I'm working on an entry for a web competition, it has to be on something we're learning this year, so i chose Life in Nazi Germany. I am NOT A NAZI.
The URL is http://tribalcorp.net
The menu works perfectly on all browsers BUT ie.
The rules state the website must function equally for all browsers.
Who knows why this script isn't compatible with Internet Explorer?
Thanks for your time
I'm working on an entry for a web competition, it has to be on something we're learning this year, so i chose Life in Nazi Germany. I am NOT A NAZI.
The URL is http://tribalcorp.net
The menu works perfectly on all browsers BUT ie.
The rules state the website must function equally for all browsers.
Who knows why this script isn't compatible with Internet Explorer?
Code:
<script type="text/javascript">
if (!document.layers) {
document.write('<div id="divStayTopLeft" style="position:absolute">');
}
</script>
<div id="divStayTopLeft">
<!--EDIT BELOW CODE TO YOUR OWN MENU-->
<table border="0" width="130" cellspacing="0" cellpadding="0">
<tr>
<!-- <td width="100%" bgcolor="#FFFFCC">
<p align="center"><b><font size="4">Menu</font></b></td> -->
</tr>
<tr>
<td width="100%">
<p align="left"><div class="navbar" id="navbar" name="navbar"> </div>
</td>
</tr>
</table>
<!--END OF EDIT-->
</div>
<script type="text/javascript">
/*
Floating Menu script- Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
var verticalpos="frombottom";
if (!document.layers) {
document.write('</div>');
}
function JSFX_FloatTopDiv()
{
var startX = 3,
startY = 600;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y;};
el.x = startX;
if (verticalpos=="fromtop") {
el.y = startY;
}else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function()
{
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopDiv();
</script>
Thanks for your time
Last edited: