PDA

View Full Version : Resolved show div problem



RolandPoort
01-11-2009, 12:03 PM
Hello

I have a weird problem going on.
Somehow a few items wont show me their contents where others do.
It's driving me mad.

I hope you guys can point me in the good direction.


<!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" xml:lang="en" lang="en">

<head>

<title>Theo-Bert Portfolio site</title>

<!-- CALL JAVASCRIPTS -->
<script type="text/javascript" src="JS/tb-imagescaler.js"></script>
<script type="text/javascript" src="JS/tb-thecenterer.js"></script>
<script type="text/javascript" src="JS/tb-thecenterer2.js"></script>
<script type="text/javascript" src="JS/tb-showhide.js"></script>
<script type="text/javascript" src="JS/tb-showhide2.js"></script>
<script type="text/javascript" src="JS/tb-menu-ie.js"></script>
<script type="text/javascript" src="JS/tb-randomimage.js"></script>
<!-- ---------------- -->

<!-- CALL CSS -->
<link rel="stylesheet" href="CSS/tb-site.css" type="text/css" />
<link rel="stylesheet" href="CSS/tb-menuonly.css" type="text/css" />
<!-- -------- -->

</head>

<body>

<!-- MENU -->
<DIV3 class="menu">
<br><a class="list-item">THEO-BERT POT</a><br>
<ul id="nav">
<li><a class="list-item" href="">GRAFISCH ONTWERP</a>&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li><a class="list-item">THEO-PROJECTEN</a>&nbsp;&nbsp;&nbsp;&nbsp;
<ul>
<li><a class="sublist-item" href="javascript:showdiv2('projecten-random')">RANDOM</a></li>
<li><a class="sublist-item" href="javascript:showdiv2('projecten-titel')">TITEL</a></li>
<li><a class="sublist-item" href="javascript:showdiv2('projecten-jaar')">JAAR</a></li>
<li><a class="sublist-item" href="javascript:showdiv2('projecten-medium')">MEDIUM</a></li>
</ul>
</li>
<li><a class="list-item" href="javascript:showdiv2('theo-wie')">THEO-WIE?</a>&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li><a class="list-item" href="javascript:showdiv2('theo-cv')">THEO-CV</a>&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li><a class="list-item" href="javascript:showdiv2('theo-contact')">THEO-CONTACT</a>&nbsp;&nbsp;&nbsp;&nbsp;</li>
</ul>
</DIV3>
<!-- ---- -->

<!-- BEGIN PAGINA INHOUD -->
<div2 class="inhoud-pagina" id="beginpagina"><SCRIPT LANGUAGE="JavaScript">showImage();</script></div2>
<!-- ------------------- -->

<!-- MENU - THEO-PROJECTEN - PROJECTEN RANDOM -->
<div2 class="inhoud-pagina" id="projecten-random" style="display: none;">projecten random</div2>
<!-- ------------------------------------------ -->

<!-- MENU - THEO-PROJECTEN - PROJECTEN OP TITEL -->
<div2 class="inhoud-pagina" id="projecten-titel" style="display: none;">projecten titel</div2>
<!-- ----------------------------------------- -->

<!-- MENU - THEO-PROJECTEN - PROJECTEN OP JAAR -->
<div2 class="inhoud-pagina" id="projecten-jaar" style="display: none;">projecten jaar</div2>
<!-- ---------------------------------------- -->

<!-- MENU - THEO-PROJECTEN - PROJECTEN OP MEDIUM -->
<div2 class="inhoud-pagina" id="projecten-medium" style="display: none;">projecten medium</div2>
<!-- ------------------------------------------ -->

<!-- MENU - THEO-WIE? -->
<div2 class="inhoud-pagina" id="theo-wie" style="display: none;">THEO WIE?</div2>
<!-- ----------------- -->

<!-- MENU - THEO-CV -->
<div2 class="inhoud-pagina" id="theo-cv" style="display: none;">THEO CV</div2>
<!-- --------------- -->

<!-- MENU -> THEO-CONTACT -->
<div2 class="inhoud-pagina" id="theo-contact" style="display: none;">THEO CONTACT</div2>
<!-- -------------------- -->

</body>

</html>

SHOWHIDE.js


function showdiv(pass) {
var divs = document.getElementsByTagName('div');
for(i=0;i<divs.length;i++){
if(divs[i].id.match(pass)){//if they are 'see' divs
if (document.getElementById) // DOM3 = IE5, NS6
divs[i].style.display="inline";// show/hide
else
if (document.layers) // Netscape 4
document.layers[divs[i]].display = 'visible';
else // IE 4
document.all.divs[i].visibility = 'visible';
} else {
if (document.getElementById)
divs[i].style.display="none";
else
if (document.layers) // Netscape 4
document.divs[i].visibility = 'hidden';
else // IE 4
document.all.divs[i].visibility = 'hidden';
}
}
}

(SHOWHIDE2.js)


function showdiv2(pass2) {
var divs2 = document.getElementsByTagName('div2');
for(i=0;i<divs2.length;i++){
if(divs2[i].id.match(pass2)){//if they are 'see' divs
if (document.getElementById) // DOM3 = IE5, NS6
divs2[i].style.display="inline";// show/hide
else
if (document.layers) // Netscape 4
document.layers[divs2[i]].display = 'visible';
else // IE 4
document.all.divs2[i].visibility = 'visible';
} else {
if (document.getElementById)
divs2[i].style.display="none";
else
if (document.layers) // Netscape 4
document.divs2[i].visibility = 'hidden';
else // IE 4
document.all.divs2[i].visibility = 'hidden';
}
}
}

RolandPoort
01-11-2009, 08:07 PM
it was in the notes

<!-- -->