Template:Iitm/clickhiding

From 2010.igem.org

(Difference between revisions)
 
(15 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
-
<head>
+
<head><title>clickhiding></title>
-
<title>clickhider</title>
+
<script language=javascript type='text/javascript'>
-
<script language="javascript">
+
-
var state = 'none';
+
-
function showhide(layer_ref) {
+
function showhide(id, visibility) {
 +
document.getElementById(id).style.display = visibility;
 +
}
-
if (state == 'block') {
 
-
state = 'none';
 
-
}
 
-
else {
 
-
state = 'block';
 
-
}
 
-
if (document.all) { //IS IE 4 or 5 (or 6 beta)
 
-
eval( "document.all." + layer_ref + ".style.display = state");
 
-
}
 
-
if (document.layers) { //IS NETSCAPE 4 or below
 
-
document.layers[layer_ref].display = state;
 
-
}
 
-
if (document.getElementById &&!document.all) {
 
-
hza = document.getElementById(layer_ref);
 
-
hza.style.display = state;
 
-
}
 
-
}
 
</script>
</script>
</head>
</head>
 +
</html>

Latest revision as of 21:48, 27 October 2010

clickhiding>