codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Changing td style "hidden" to "table-cell"  ppieter at 22:28 on Thursday, June 30, 2005
 

Hello everybody,

I'm having some problems changing the style.
Changing it from "table-cell" to "hidden" is no problem, but the other way around doesn't seem to work.

Here's a bit of code:

<head>
<script language="JavaScript">
function showCell() {
document.getElementById('cellName').style.visibility='table-cell';
}
</script>
<style type="text/css">
#cellName {visibility:hidden; }
</style>
</head><body>
<table border="1" id="myTable">
<tr><td height="50">text<td></td></td></tr>
<tr><td>text</td><td id="cellName">This should appear but is doesn't</td></tr>
</table>
<a href="#" onclick="showCell()">link</a>

  Re: Changing td style  DougMelvin at 16:16 on Tuesday, July 19, 2005
 

Hey buddy.. First off i noticed no closing body or html tags.. but i'm sure that's just because it's a code snippet :-P

The Fixed: use visibility="visible"
works in firefox/mozilla and IE (and should be okay in NS4)



<head>
<script language="JavaScript">
function showCell() {
document.getElementById('cellName').style.visibility='visible';
}
</script>
<style type="text/css">
#cellName {visibility:hidden; }
</style>
</head><body>
<table border="1" id="myTable">
<tr><td height="50">text<td></td></td></tr>
<tr><td>text</td><td id="cellName">This will appear when the below link is clicked</td></tr>
</table>
<a href="#" onclick="showCell()">link</a>
</body>
</html>


<Added>

note: when using javascript (rather than a stylesheet) to change visibility,
NS4 is the "readheaded stepchild"

see here: http://www.webreference.com/js/column18/visibility.html

  Re: Changing td style  ppieter at 15:01 on Thursday, July 28, 2005
 

Hi DougMelvin, thanks for your reply.

i'll give it a try.

Cheers,

pieter

  Re: Changing td style  ppieter at 15:02 on Thursday, July 28, 2005
 

Hi DougMelvin, thanks for your reply.

i'll give it a try.

Cheers,

pieter

<Added>

sorry for double reply: guess i was to impatient








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Date validation
•  Moncler Outlet For Sale Cheap Moncler Jackets & Cheap Moncler Coats & Moncler Vests
•  Wholesale Cheap Gucci Shoes Gucci Sneakers Gucci Handbags Gucci Backpack
•  Re: Why Use Method?
•  Re: doubt in asp.net
•  Re: calling C# from javascript
•  China Cheap Shoes Store Sale Cheap Air Jordans Shoes, Cheap Jordans, Cheap Nike Shoes & Nike Sneakers
•  "The best Method Along with Golf suggestions
•  What is the important of coding standard?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012