HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Drop down table
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> HTML Table
View previous topic :: View next topic  
Author Message
soniczero



Joined: 19 Nov 2008
Posts: 2

Posted: Wed Nov 19, 2008 4:37 pm     Drop down table  

I need to get a table to drop down on click here's what I have so far.
Code: <table border="1"<TR><TD><div align="center"><div class="inner"><span class="corners-top"><span></span></span><div class="h3"></div><table width="100%" cellspacing="" cellpadding="" border="1" align="right" onclick="if(this.getElementsByTagName('td')[1].style.display == 'none'){ this.getElementsByTagName('td')[1].style.display = '';this.getElementsByTagName('td')[2].style.display = 'none'; }else{ this.getElementsByTagName('td')[1].style.display = 'none';this.getElementsByTagName('td')[2].style.display = '';}" style="cursor: pointer;"><tr><td>DO NOT ask to be a moderator</td></tr><tr><td style="display: '';"></td><td style="display: none;"><b>We will not make you a moderator or an owner without having a reason. Only members of this clan will become moderators/owners given by permission of the clan's owner, soniczero. You are not here to just ask to be a moderator or an owner; you are here to chat, battle and trade with other Trainers.<br/></div></TD></TR>
I want it to be larger so when you click on it, it doesn't have to automatically enlarge itself.

Thanks.
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS

Posted: Wed Nov 19, 2008 7:37 pm      

Maybe stick your table (ugh :p) inside the div tag in the following:

Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="MSS Website Studio by van IJperen Software Inc. - http://www.marsansoft.nl">
<script type="text/javascript"><!--
var state = 'none';

function showhide(layer_ref) {

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>
</head>
<body>
<p><a href="#" onclick="showhide('div1');">Click to show/hide me!</a></p>
<div id="div1" style="display: none;"><p>This is the content that will appear.</p><p>NOTE: Use different IDs for different divisions</p></div>

</body></html>

<!-- ** file created on 11/19/2008 9:32:07 PM ** -->
<!-- ** file created by MSS Website Studio http://www.marsansoft.com -->
soniczero



Joined: 19 Nov 2008
Posts: 2

Posted: Thu Nov 20, 2008 2:34 pm      

PayneLess Designs wrote: Maybe stick your table (ugh :p) inside the div tag in the following:

Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="MSS Website Studio by van IJperen Software Inc. - http://www.marsansoft.nl">
<script type="text/javascript"><!--
var state = 'none';

function showhide(layer_ref) {

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>
</head>
<body>
<p><a href="#" onclick="showhide('div1');">Click to show/hide me!</a></p>
<div id="div1" style="display: none;"><p>This is the content that will appear.</p><p>NOTE: Use different IDs for different divisions</p></div>

</body></html>

<!-- ** file created on 11/19/2008 9:32:07 PM ** -->
<!-- ** file created by MSS Website Studio http://www.marsansoft.com -->
Thanks
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS

Posted: Thu Nov 20, 2008 3:56 pm      

You're welcome. Post back on this if you have problems getting it to work for you.
 
 
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> HTML Table
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group