I'm not up on my java and grabbed this code from somewhere on the 'net, so I need help with the code to do the following:
start some items collapsed, and others expanded
when the main page opens, it jumps down to the bottom of the main page - how do I get it to stay at the top?
I'm trying to "freshen" up the project site some and make it more usable. Here's the test site: http://qmailtoaster.com/test.html
Here's the code:
<!-- Begin Javascript for expanding menus -->
<script>
function ShowHide(tab) {
var t = document.getElementById(tab);
if (t.style.display == '') {
t.style.display = 'none';
t.style.visibility = 'hidden';
}
else {
t.style.display = '';
t.style.visibility = 'visible';
}
}
function ShowAll() {
var t = document.getElementById('info');
for (var i = 0; i < t.rows.length; i++) {
if (t.rows[i].id != "control") {
t.rows[i].style.display = '';
t.rows[i].style.visibility = 'visible';
}
}
}
function CollapseAll() {
var t = document.getElementById('info');
for (var i = 0; i < t.rows.length; i++) {
if (t.rows[i].id != "control") {
t.rows[i].style.display = 'none';
t.rows[i].style.visibility = 'hidden';
}
}
}
</script>
<!-- End Java script to expand menus -->
<table id="info"> <!-- Begin table for java menus -->
<!------- Begin Display Stable Packages ---------->
<tr id="control">
<td bgcolor="#007700" width="100%" id="block1" class="sectionOpen" onclick="ShowHide('StableTab')"><center><font color="#FFFFFF">Stable Packages</center></td>
</tr>
<tr id="StableTab">
<td width="100%">
<iframe src="stable.php" name="stableFrame" width="780" height="550">
</iframe>
</td>
</tr>
<!------- End Display Stable Packages ---------->
<!------- Begin Display of test site for iframe ---------->
<tr id="control">
<td width="100%" id="block2" class="sectionOpen" onclick="ShowHide('GTab')"><center>Google info</center></td>
</tr>
<tr id="GTab">
<td width="100%">
<iframe src="http://google.com" name="gInfoFrame" width="650" height="120">
</iframe>
</td>
</tr>
<!------- End Display of test site for iframe ---------->
</table>
Can someone give me some tips on how to accomplish what I'm looking for?
Thanks in advance!

New Topic/Question
Reply



MultiQuote




|