problems with IE 5.2 for mac

admin

Administrator
Staff member
Hi,

I have written a javascript code that displays a navigational menu, but for some reason the menu is not displayed properly in IE 5.2 for mac. It works in all other browsers. Here is the code:

<style>
.header{
text-align:center;
vertical-align:middle;
}
.header a{
font-size:12px;
font-family:arial;
height:15px;
font-weight:bold;
text-decoration:none;
color:blue;
}
.header a:hover{
color:dark blue;
}

.subheader{
font-size:10px;
font-family:arial;
height:15px;
text-align:center;
border-top:2px solid black;
}
.subheader a{
font-weight:bold;
text-decoration:none;
color:blue;
}
.subheader a:hover{
color:black;
}
</style>
</head>
<BODY>
<table width="848" height="63" border="0">
<tr>
<td width="178" height="54" bgcolor="#FFFFFF">
<div align="justify">&nbsp;&nbsp;<img src=http://www.webdeveloper.com/forum/archive/index.php/"images/Rawlingslogo.gif" width="141" height="13"></div></td>
<td width="660"> <div align="center">
<p>&nbsp;</p><p>
<script language="JavaScript">
var link_array = new Array();
link_array = [
["<img src='images/about.gif' border ='0'>","index.htm","_parent",[]],
["<img src='http://www.webdeveloper.com/forum/archive/index.php/images/services.gif' border ='0'>","services.htm","_parent",[["Retail Financial Sector","rfs.htm","_parent"],["Outsourcing","outsourcing.htm","_parent"],["Post Acquisition Integration","pai.htm","_parent"],["Improving Operational Performance","iop.htm","_parent"],["Mortgage Lending","ml.htm","_parent"],["Payment Cards","pcards.htm","_parent"],["Programme Management","programmgt.htm","_parent"],["Change Management","changemgt.htm","_parent"]]],
["<img src='http://www.webdeveloper.com/forum/archive/index.php/images/publications.gif' border ='0'>","publications.htm","_parent",[["White Papers","whitepapers.htm","_parent"],["Presentations","presentations.htm","_parent"],["Case Studies","casestudies.htm","_parent"],["Articles","articles.htm","_parent"]]],
["<img src='http://www.webdeveloper.com/forum/archive/index.php/images/news.gif' border ='0'>","news.htm","_parent",[]],["<img src='http://www.webdeveloper.com/forum/archive/index.php/images/contact.gif' border ='0'>","contact.htm","_parent",[]]
];

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
var ns6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1;
var ns4=document.layers;

function changes(id)
{
var txt ="<center>";
id = id-1
for(i=0;i<link_array[id][3].length;i++)
{
txt += "<a href='http://www.webdeveloper.com/forum/archive/index.php/"+link_array[id][3][1]+"' target='"+link_array[id][3][2]+"'>"
txt += link_array[id][3][0];
txt += "</a>&nbsp;&nbsp;&nbsp;&nbsp;"
}
txt += "</center>"

if(ie4||ns6)
{
dsub_obj.innerHTML = txt;
}
if(ns4)
{
dsub_obj=document.dsub;
dsub_obj.document.write(txt);
dsub_obj.document.close();
}
}

if(ns4) document.write("<layer><center>")
else document.write("<div class=header>")
for(i=0;i<link_array.length;i++)
{
document.write("&nbsp;&nbsp;")
document.write("<a href='http://www.webdeveloper.com/forum/archive/index.php/"+link_array[1]+"' target='"+link_array[2]+"' onmouseover=changes("+(i+1)+")>")
document.write(link_array[0]);
document.write("</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
}
if(ns4) document.write("</center></layer><br><layer id=dsub name=dsub class=subheader></layer>")
else document.write("</div><div id=dsub name=dsub class=subheader></div>")
var dsub_obj
if(ns4)
{
dsub_obj=document.dsub;
}
if(ie4)
{

dsub_obj=document.all.dsub;
}
if(ns6)
{
dsub_obj=document.getElementById("dsub");
}
changes(1);
</script>
 
Back
Top