Ok i just tried a different simplfied script. This works so much better, and nicer. It doesn't even blow up when javascript is turned off.
Here is the latest code:
Code:
<html><head>
<title>test</title>
<style type="text/css">
p.text { z-index: 1;
position: inherit;
}
table.bg {
position:relative;
background-position:right bottom;
background-repeat:no-repeat;
top: 0px;
}
td.menu { height:11px }
</style>
<script type="text/javascript">
function switchMenu(obj) {
var el = document.getElementById(obj);
if ( el.style.display != 'none' ) {
el.style.display = 'none';
}
else {
el.style.display = '';
}
}
function hide(){
document.getElementById("myvar").style.display='none';
document.getElementById("myvar2").style.display='none';
}
</script>
</head>
<body onload="hide('myvar','myvar2');">
<table width="100%" border="1" cellpadding="0" cellspacing="0" background="cornerimg.png" class="bg">
<tr>
<td width="20%" valign="top" class="menu" scope="col">
<div><a onclick="switchMenu('myvar');" title="Switch the Menu">Home</a></div>
<div id="myvar">
<a href="#">Desinfectie</a> <br>
<a href="#">Desinfectie</a> </div>
<div>
<a onclick="switchMenu('myvar2');" title="Switch the Menu">test</a></div>
<div id="myvar2">
<a href="#">Desinfectie</a><br>
<a href="#">Desinfectie</a>
</div>
</td>
<td width="80%" rowspan="10" scope="col">*insert Lorum ipsum here*</td>
</tr>
</table>
Still a bit messy.
Note that i have no doctype at all right now, but that will come before it goes online. Can i add the doctype to header.php tho?
I found out that my workspace is workign against me. I am using USB webserver, which is an awesome tool by the way, to test my php pages. Most of the time it loads slow, and sometimes it just never stops loading. So i am suspecting that for failing half of the attempts i did. (it usually works like a charm though..just not here i guess).
It's broken right now, but just before it stopped working it showed me a working page. Could someone check if it works? I suppose you can make it a .html as i removed the php includes for editing.