Awesome! What I have so far works pretty well, just need to adjust one
thing.
Oh, and Lasse... would you like me to credit you in my page code? This is
your code really, so if you do, just let me know what info you want included
in the credit.
Ok, here's what I have:
---
// Create an array of our tabs
var divArray = [];
function cacheDivs() {
var divs = document.getElementsByTagName("div");
for (var i=0;i<divs.length;i++) {
if (/^(tab\_overview|tab\_resources)/.test(divs[i].id)) {
divArray[divArray.length]=divs[i];
}
}
for (var i in divArray) {
divArray[i].style.display = (divArray[i].id ==
'tab_'+tabname)?'block':'none';
}
}
// Find which tabs are set to open
var openTab;
function initialize() {
openTab = document.getElementById('tab_overview01'); // ** need to change
this so all 'overview' series tabs are open
}
// Function which actually swaps tabs
function changePopTab(tabname) {
openTab.style.display = 'none';
openTab = document.getElementById('tab_'+tabname);
openTab.style.display = 'block';
}
---
---
<body onload="initialize();">
<div id="popup01" .... >
<some content... >
<div id="poptabs">
<div ... >
<a href="javascipt:;" onclick="changePopTab('overview01');return
false;">Overview</a> |
<a href="javascipt:;"
onclick="changePopTab('resources01');return false">Resources & Links</a>
</div>
<div id="tab_overview01" .... >
<content... >
</div>
<div id="tab_resources01" .... >
<content... >
</div>
</div>
</div>
</body>
---
When the page loads, all 'tab_overviewXX' ID's are set as open. Then when
'changePopTab' is called the idea is just to switch the matching
'tab_overviewXX' with 'tab_resourcesXX' (i.e. tab_overview08 <-->
tab_resources0

. So the tabs are to toggle information in a pop-up 'layer',
and there are several pop-up 'layers' in a page.
I'm sorry I wasn't as clear earlier, my head was in a bit of a fog (lack of
sleep). If you can help me get this last bit sorted out that would be great!
I have learned a lot already from this discussion, but some of it is a bit
over my head still.
Gabe
--
|N|O|S|P|A|M| -- onlineq (a t) azonis (d o t) com