if anyone uses a mac or linux, can u test this:
===============================================
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Tabs</title>
<style>
.hide {border:1px solid #000;overflow:auto;height:80px;}
</style>
<script type="text/javascript">
function initTabs() {
if(document.getElementById && document.createTextNode) {
var t=document.getElementById('elTabs');
var a=t.getElementsByTagName('a');
for (var i=0;i<a.length;i++) {
a.onclick=function(){show(this);return false}
a.onkeypress=function(){show(this);return false}
// a.on..whatever=function(){show(this);return false}
}
// Hide all.
hidem();
// Show first panel onload.
document.getElementById('panel1').style.display='block';
}
}
function show(l) { // Show a panel.
hidem();
var id=l.href.match(/#(\w.+)/)[1];
document.getElementById(id).style.display='block';
}
function hidem() {
var p = document.getElementsByTagName('div');
for (var i=0; i<p.length;i++)
if(p.className=="hide") {p.style.display = "none"}
}
// tab persistance can go here
window.onload=initTabs;
</script>
</head>
<body>
<br><br>
<div id="elTabs">
<a href="#panel1">Panel 1</a>
| <a href="#panel2">Panel 2</a>
| <a href="#panel3">Panel 3</a>
| <a href="#panel4">Panel 4</a>
</div>
<div id="panel1" class="hide">...panel 1 data here...</div>
<div id="panel2" class="hide">
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
</div>
<div id="panel3" class="hide">...panel 3 data...</div>
<div id="panel4" class="hide">...panel 4 data...</div>
<div>...test...</div>
</body>
</html>
=========================
i'm trying to do a tab menu (or who knows what will come out of this)
Tks a bunch!
===============================================
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Tabs</title>
<style>
.hide {border:1px solid #000;overflow:auto;height:80px;}
</style>
<script type="text/javascript">
function initTabs() {
if(document.getElementById && document.createTextNode) {
var t=document.getElementById('elTabs');
var a=t.getElementsByTagName('a');
for (var i=0;i<a.length;i++) {
a.onclick=function(){show(this);return false}
a.onkeypress=function(){show(this);return false}
// a.on..whatever=function(){show(this);return false}
}
// Hide all.
hidem();
// Show first panel onload.
document.getElementById('panel1').style.display='block';
}
}
function show(l) { // Show a panel.
hidem();
var id=l.href.match(/#(\w.+)/)[1];
document.getElementById(id).style.display='block';
}
function hidem() {
var p = document.getElementsByTagName('div');
for (var i=0; i<p.length;i++)
if(p.className=="hide") {p.style.display = "none"}
}
// tab persistance can go here
window.onload=initTabs;
</script>
</head>
<body>
<br><br>
<div id="elTabs">
<a href="#panel1">Panel 1</a>
| <a href="#panel2">Panel 2</a>
| <a href="#panel3">Panel 3</a>
| <a href="#panel4">Panel 4</a>
</div>
<div id="panel1" class="hide">...panel 1 data here...</div>
<div id="panel2" class="hide">
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
...panel 2 data here...<br />
</div>
<div id="panel3" class="hide">...panel 3 data...</div>
<div id="panel4" class="hide">...panel 4 data...</div>
<div>...test...</div>
</body>
</html>
=========================
i'm trying to do a tab menu (or who knows what will come out of this)
Tks a bunch!