Solved

HTML Table problem...

Posted on 2003-12-08
6
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Export JSON response data to Excel in IE9 3 97
java cigar challenge 58 215
maven project jars 7 61
Books that can get me started on JAVA 2 132
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
How many times a day do you open, acknowledge, or close an IT incident? What’s your process? Do you have a process depending on the incident, systems involved, and other factors? New Relic Alerts gives you options for how you interact with notifica…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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