Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > HTML / XHTML
User Name:
Password:
 

Closed Thread
Thread Tools   Display Modes
  View First Unread
 
Old 09-26-2005, 06:36 PM
  #1
tall_gs
Novice (Level 1)
 
Join Date: Sep 2005
Posts: 1
iTrader: (0)
tall_gs is an unknown quantity at this point
How to display/hide the HTML table ?

Hi Friends,

I am new to web designing.

I have a requirement where I have to display/hide the HTML table on pressing a button.

My questions are
1) can I display/hide the HTML table? If yes, how to do that? Do I need to use HTML tag or CSS?

2) Also I need to have color/ style to a button using CSS. How do I do that?

Please let me know website where I can learn Advanced HTML and CSS.

Thanks in Advance!
tall_gs is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 09-26-2005, 07:45 PM
  #2
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 33,142
iTrader: (0)
scoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of light
it would seem to me that if you now that such things exsit you already know how to do it

www.w3schools.com will help you out with most of it.
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01,
HTML 5, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 09-26-2005, 10:49 PM
  #3
scatteredbomb
Myrmidon (Level 12)
 
Join Date: Dec 2004
Location: New Mexico, USA
Posts: 176
iTrader: (0)
scatteredbomb is on a distinguished road
Yeah i would be intrested in doing the same thing. Hrm, i don't really know what to search for in the w3schools
__________________
My Site - MySpace - MyBlog
scatteredbomb is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 09-27-2005, 12:10 AM
  #4
_Aerospace_Eng_
The CSS Master (somewhat)
 
Join Date: Dec 2004
Location: In a galaxy far far away...
Posts: 11,146
iTrader: (0)
_Aerospace_Eng_ has disabled reputation
You guys aren't even trying. One can be done with javascript by setting the display to none or block depending on the tables current state. Two can be done with 5 lines of CSS.
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>Untitled Document</title>
<style type="text/css">
.button {
border:1px solid #000;
background:#F00;
color:#FFF;
font-weight:bold;
}
</style>
<script type="text/javascript">
function setTable(what){
if(document.getElementById(what).style.display=="none"){
document.getElementById(what).style.display="block";
}
else if(document.getElementById(what).style.display=="block"){
document.getElementById(what).style.display="none";
}
}
</script>
</head>

<body>
<a href="#" onclick="setTable('table1');return false">Show/Hide Table</a>
<table id="table1" style="display:block;">
	<tr>
		<td>This table will be hidden on click of the link above it.</td>
	</tr>
</table>
<p>The button below is styled with CSS</p>
<input class="button" type="button" value="Click me!">
</body>
</html>
__________________

76 invites left. PM me for a Gmail invite along with email addy.
Why we won't help you .::. Web Developer's Handbook .::. Why Tables for Layout is Stupid?
_Aerospace_Eng_ is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 02-27-2014, 08:39 AM
  #5
ChauhanRohit
Novice (Level 1)
 
Join Date: Feb 2014
Posts: 4
iTrader: (0)
ChauhanRohit is an unknown quantity at this point
i have a similar problem can you help me with this.
i am working on a search bar, the results are displayed in a table which are generated from a php file.
when i start the page there is an empty table displayed , how do i hide the table when i have not typed any thing in the search bar.
ChauhanRohit is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Old 02-27-2014, 05:45 PM
  #6
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 33,142
iTrader: (0)
scoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of light
ChauhanRohit, please start you own thread and somebody will be right on it. But _Aerospace_Eng_ has the answer. PHP cannot do it
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01,
HTML 5, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it?
Closed Thread
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 04:32 PM.

   

Mascot team created by Drawshop.com | Web Hosting

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.