Link to home
Start Free TrialLog in
Avatar of Kuldeepchaturvedi
KuldeepchaturvediFlag for United States of America

asked on

HTML Table problem...

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!!
Avatar of jimmack
jimmack

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?
Avatar of Kuldeepchaturvedi

ASKER

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..
I understand ;-)
ASKER CERTIFIED SOLUTION
Avatar of jimmack
jimmack

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
;-)

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 ;-)