inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Jul 7, 2010 19:07:49 GMT -8
what i mean is that i want there to be a button in the table that hides the table...makes it so all they see is one little slip saying "Show Table"
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jul 7, 2010 19:09:39 GMT -8
Oh, use something like this: function hideShow(it){ (document.getElementById(it).style.display == 'none')? document.getElementById(it).style.display = '' : document.getElementById(it).style.display = 'none'; }
Make the first tr the link (javascript: hideShow('tr_id')
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Jul 7, 2010 19:18:34 GMT -8
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jul 7, 2010 19:42:49 GMT -8
<table id="floatBox" cellspacing="1" cellpadding="0" border="0" align="left" valign="top" width="200" bgcolor="0066FF" class="bordercolor"> <tr id="tr_id"> <td class="titlebg" align="center" width="100%" onClick="hideShow('tr_id');"> <font size=2>Welcome</font> <table border="0" width="100%" cellpadding="2" cellspacing="0"> <tr> <td align="left" valign="top" class="welcomebg" bgcolor="CCCCFF"> <center><div id="welcomeMessage"></div> <br />
<div id="jumpintable"></div></center> <tr> <td class="titlebg" align="center" width="100%"> <font size=2>Staff</font>
<tr> <td align="left" valign="top" class="welcomebg" bgcolor="CCCCFF"> <center><div id="staffinfo"></div></center> <tr> <td class="titlebg" align="center" width="100%"> <font size=2>Affiliates</font> <tr> <td align="left" valign="top" class="welcomebg" bgcolor="CCCCFF"> <marquee><div id="affiliateinfo"></div></marquee> </td></tr> </td></tr> </td></tr> </td></tr> </td></tr> </td></tr></table> </td></tr></table>
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jul 7, 2010 21:01:05 GMT -8
Oh, use something like this: function hideShow(it){ (document.getElementById(it).style.display == 'none')? document.getElementById(it).style.display = '' : document.getElementById(it).style.display = 'none'; }
Make the first tr the link (javascript: hideShow('tr_id') lolno. I'm pretty sure inline if statements only return values, not parse it. However, even if it does, it's not standard, and takes longer than this: function hideShow(it){ document.getElementById(it).style.display = (document.getElementById(it).style.display == "none" ? "" : "none"); }
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jul 7, 2010 22:21:38 GMT -8
xD It works, and that's how I roll. Works fine for me, and it executes quite quickly.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Jul 8, 2010 13:50:45 GMT -8
really what i want is for it to almost hide but leave a titlebg that says "Click to show table"
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jul 8, 2010 13:59:15 GMT -8
okay, then use this: <table id="floatBox" cellspacing="1" cellpadding="0" border="0" align="left" valign="top" width="200" bgcolor="0066FF" class="bordercolor"> <tr> <td width="100%" class="titlebg" align="center"> <a href="javascript: hideShow('fBoxBody');">Hide Floating Box</a> </td> </tr> <tbody id="fBoxBody"> <tr> <td class="titlebg" align="center" width="100%"> <font size=2>Welcome</font> <table border="0" width="100%" cellpadding="2" cellspacing="0"> <tr> <td align="left" valign="top" class="welcomebg" bgcolor="CCCCFF"> <center><div id="welcomeMessage"></div> <br /> <div id="jumpintable"></div></center></td></tr> <tr> <td class="titlebg" align="center" width="100%"> <font size=2>Staff</font> </td></tr> <tr> <td align="left" valign="top" class="welcomebg" bgcolor="CCCCFF"> <center><div id="staffinfo"></div></center></td> </tr> <tr> <td class="titlebg" align="center" width="100%"> <font size=2>Affiliates</font> </td> </tr> <tr> <td align="left" valign="top" class="welcomebg" bgcolor="CCCCFF"> <marquee><div id="affiliateinfo"></div></marquee> </td></tr> </tbody> </table>
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Jul 8, 2010 14:27:20 GMT -8
well i messed that up BAD
first you can look and see what i did wrong next the text dosn't change when it is hidden to say SHOW box
|
|