Solved

HTML Table problem...

Posted on 2003-12-08
6
199 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
constuctor calling other constructor 2 74
dateFashion java challenge 9 132
Looking for some programs to resell or buy source codes 1 75
struts hibernate integration example 28 123
We need a new way to communicate time sensitive or critical info.   The best part of my role at xMatters is visiting our clients all over the world to learn about how they operate their businesses, share insights that xMatters has gleaned across…
With the rapid rise in mobile usage, mobile devices are here to stay and have become an integral part of doing business. Here are 9 great apps for your BYOD environment.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

16 Experts available now in Live!

Get 1:1 Help Now