Solved

HTML Table problem...

Posted on 2003-12-08
6
197 Views
Last Modified: 2010-04-01
All right it might not be the right area to ask this question but I am not sure where else it can be answered:
First let me explain what I am trying to accomplish.....

We have have a enterprize application which uses Grids ( tables) very extensively... I have made a frame work so that these grids can be written without coding anything...
Here is how it works..
First user goes to a HTML page where he/she filles out a form which asks questions like, rows per page, wheather its a Query or a stored procedure call number of columns to be shown, name of these columns and so on...

This information is saved in a XML file at the server upon submit.

At the runtime when grid is requested, This XML file is read and system makes a connection to Host ( AS/400) to get the Resultset, This result set is then converted to XML and then a generic XSL is applied to it to create the HTML output to the browser.
Okay so much for useless details...
Problem is that user may want to hide some columns when the table is displayed ( it might be necessary to have that data for other technical functions but user have no use to it.. for example. record written date or something like this).

now when I try to hide that particular TD of table, it leaves a gray area which messes up the whole layout of table....!!
Since the XSL is generic I can not make every column width specefic..
So is there any way to handle this situation.... Currently I am using a CSS to put the Styling on TDs...
CSS for Hidden column looks something like this..

.gridHidden
{
    visibility: hidden;
    pixelHight:0;
    pixelWidth:0;      
    FONT-FAMILY: verdana,arial,sans-serif;
    FONT-SIZE: 0pt;
    FONT-STYLE: none;
    FONT-WEIGHT: normal;
    LINE-HEIGHT: 0pt;    
   TEXT-INDENT: 0px
}

I can provide you other details as well if needed..
Thanks for all your help in advance!!
0
Comment
Question by:Kuldeepchaturvedi
  • 4
  • 2
6 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9895435
Since you offer to provide more detail, I will ask a question ;-)

I assume that you have some information somewhere that identifies whether a column is hidden or not.  Would it not be possible to simply not display the TD at all, rather than trying to hide it?
0
 
LVL 19

Author Comment

by:Kuldeepchaturvedi
ID: 9895522
Yes it is absolutely possible but then the purpose of hiding it is gone...! It is being hided so that user can not see it but when a function tries to do a cell[8].innerText.. this data should be available for processing.....
If I eliminate the TD altogether then I will loose the information also which is needed for technical processing..
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9895542
I understand ;-)
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 15

Accepted Solution

by:
jimmack earned 500 total points
ID: 9895620
Maybe this might help (I'm no CSS expert ;-))

http://www.w3.org/TR/REC-CSS2/tables.html#q4

"If the 'visibility' of a column is set to 'collapse', none of the cells in the column are rendered"
0
 
LVL 19

Author Comment

by:Kuldeepchaturvedi
ID: 9895678
Hmm..........
you know what.... that Collapse thing does not work but don't worry you gave me the pointer in very right direction.....:-)
This is what W3c have to say about it....

The 'visibility' property specifies whether the boxes generated by an element are rendered. Invisible boxes still affect layout (set the 'display' property to 'none' to suppress box generation altogether). Values have the following meanings:


so if I do the
display:none in my CSS the gray area is gone...!!!! ironic thing is that I was using this property already on some of the form elements......It never occured to me that it will work with tables too............


Thanks for your pointers..... so now do you want points for using google....:-) ( just kidding) you were helpfull....

Cheers
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9895717
;-)

Thanx Kuldeepchaturvedi.  It's one of those things.  Sometimes it just helps to explain a problem to someone with no similar experience and see what they come up with.  I'm glad I could at least be of some assistance ;-)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem with Pie chart in Jsp 20 183
Display the newly inserted values 3 72
web service Rest Client creation 4 73
parse example 13 86
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now