Solved

Tables with fixed columns

Posted on 1998-10-06
18
306 Views
Last Modified: 2010-04-09
How do I create a Fixed Column using a Table?I need
the fixed Column to contain some key field, which can
always be viewed while scrolling through the other
columns.  
0
Comment
Question by:anupdn
  • 5
  • 4
  • 2
  • +7
18 Comments
 
LVL 28

Expert Comment

by:sybe
Comment Utility
use a frame
0
 
LVL 4

Expert Comment

by:martinag
Comment Utility
sybe, You need to post that as an answer :-)

Martin
0
 

Author Comment

by:anupdn
Comment Utility
If I do add frames How can I maintain a link between the tables in both the frames, so as to scroll vertically. I mean if at all there are more then screen ful of rows, I need to scroll vertically which means both my frames/tables should be in sync.
How do I do this?This is in fact one thing I had tried out, but it fails when I want to scroll vertically!!!
0
 
LVL 4

Expert Comment

by:jbrugman
Comment Utility
Then use layers, that affect each other when nesesary. be ware, this only works in NN>=4 and IE>=4.
0
 
LVL 5

Expert Comment

by:j_powers
Comment Utility
Frames can be done, but what you are asking is very integrated. DHTML will offer some solutions, but you will not be able to see this stuff in other browsers.

I have a friend that had another ingenious idea that worked pretty good. This was for an intranet site, so I don't have an address, if that page is still being used.

He created a picture that would become the background image on the chart. The Table was placed around that picture. He gave it a great effect by watermarking the background.

So If you need a 'fixed column, you have some options. Just remember, the cooler the option, the more complicated it is...
0
 
LVL 1

Expert Comment

by:development
Comment Utility
I may not have got the question correctly but all you wanted to know is how to make a column in a table fixed?  Why not just use fixed width as opposed to variable % widths.
0
 

Expert Comment

by:kookoo
Comment Utility
use Perl can help you. Every output can be control by fixed format, very easy.



0
 
LVL 12

Expert Comment

by:Otta
Comment Utility
DEVELOPMENT, the way I read ANUPDN's question is that he/she
has data like:
 Beatles: John, Paul, George, Ringo
 Stones: Mick, Keith
and wants output in a table like:

Beatles  John
Beatles  Paul
Beatles  George
Beatles  Ringo
Stones   Mick
Stones   Keith

i.e., the first column changes "slowly",
while the second column changes for every row.

A background-image won't help.
The generated HTML will have to "distribute" the data
over the appropriate rows.
0
 
LVL 1

Expert Comment

by:ivancho
Comment Utility
The only way for this to work with ALL browsers and not only IE4/or NN4 is to split your table.
Be aware that while there is no problem in scrolling VERTICALLY it is considered VERY ANNOYING for a user to scroll HORIZONTALLY.
Just split your table and put the freezed column/s first- there is no other way.
Sorry.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:anupdn
Comment Utility
I have already tried this solution, which I had already commented on.It is indeed a problem scrolling horizontally.I am sorry that I have to reject this solution.
I want a generic solution, which can work in Netscape and in IE.

0
 
LVL 2

Accepted Solution

by:
johnny99 earned 20 total points
Comment Utility
anupdn, I'm sorry to have to tell you, I don't think anyone understands your question, which is why you keep getting unsatisfactory answers.

Please tell us what you want in more detail, with examples.

*My* interpretation of what you want is that you want the "fixed" column to contain some sort of generic information like:

Name:    
Address:
Number:  

and the other columns to contain the details of a number of different records, for instance

Name:    Fred
Address: Elm Street
Number:  555-1234


And in some way you want to be able to scroll one record (3 lines) at a time, i.e. you want to be able to scroll in one click from the above to:

Name:    Bob
Address: Oak Street
Number:  555-4321

(This is the effect you can get in Excel by splitting the screen, for instance)

If that's what you want, then we can all go home, because it's simply not possible. Tables don't scroll, only windows and frames scroll, and you can't control the scrolling of frames in any way that will force the name to line up against "Name:" and the address to line up against "Address:" etc.

The only way to achieve this effect would be having each person's record as a separate HTML document.  Then rather than scrolling, you could link each record to the next and make the new record load into the frame when you went from Fred to Bob. I can't see any other way.
0
 
LVL 12

Expert Comment

by:Otta
Comment Utility
JOHNNY99 wrote:
> I don't think anyone understands your question,

Did you read the comment by OTTA ?
It was quite similar to your understanding of ANUPDN's question.
0
 
LVL 2

Expert Comment

by:johnny99
Comment Utility
Yes, Otta, I did read it, but I think my interpretation is different enough to be worth posting, but I think the important thing is that anupdn spells out exactly what he or she wants -- so many of the questions on Experts-Exchange are like this: "I want to do [blah]", but they don't know how to put blah into words... I guess if they did, then they wouldn't have to ask...
0
 

Author Comment

by:anupdn
Comment Utility
johnny99,
I am sorry to tell you this, but I think you making a big mess of very shraight forward question.
I will try to give you more examples.
Suppose I have 15 columns in a table.The first Column contains the description field.Now it's quite obvious that when you talking of 15 columns, you cannot view all the 15 columns in one shot on the screen.
Now here's the catch. Suppose I want to view the 15th column, I would scoll vertically to the column, which means that my first column is no more visible to me !
Thats why when I scroll to the 15th column , I need to see the first column, which means I have to keep the first column as fixed.

If you have ever worked in VB, you must have observed how the Microsoft Grid works when you say that you want a row as fixed !

Hope this is a better way to present my problem.I know that it cannot be done in one single Table.There should be an alternate way of doing this.A round about way of doing it.

I nearly solved it when I used frames.But it's a pain when the person has to scroll horzontally.

Thanks
0
 
LVL 2

Expert Comment

by:johnny99
Comment Utility
Er, well, you've accepted my answer, so I guess it's over.
What you described is basically what I guessed you meant, but still I don't understand what you mean.

"Column" to me means a vertical series of items. Therefore if you have fifteen columns, you would have to scroll horizontally to go to from 1 to 15. You're either confused between column and row or you're confused between horizontal and vertical!

I have no intention of ever working in VB, nor do I know or care what Microsoft Grid might be. : )

Two things:

* "it's quite obvious that when you talking of 15 columns, you cannot view all the 15 columns in one shot on the screen" er, not to me, because it depends on the size of the screen and the width of the columns

* you seem to be hung up on the idea that a user shouldn't have to scroll horizontally -- I don't think it's a problem, and if it is, why don't you just reorient your table so that they scroll vertically?

As an HTML question, this one has been answered long ago. How can you create a table with a fixed column? You can't.
0
 

Author Comment

by:anupdn
Comment Utility
Dear johnny99,
I know very well that tables can't have fixed columns.But there are lot more things which are not directly possible in HTML.But still there are ways and means to make it happen.

I am sorry that I made a mistake when saying that that 'to view the 15th column we have to scroll vertically' it should have been
'horizontally'.

Finally I never told you to work in VB and for the matter know what's a Microsoft grid is !!!I just wanted  to know if you had previously worked in VB, so as to give you a better perspective!

I am also sorry to tell you that no one has given me a right soultion.I will surely post the solution once I come across one!!!


Anyhow thanks for your 'response'.
0
 
LVL 2

Expert Comment

by:johnny99
Comment Utility
Are we having a fight now?

I think you're mistaken. You've already got the answer. The thing you want to do is going to be done with frames or not at all, so you should give someone the points -- I'm not saying it should be me, I don't care, but you're making assumptions about HTML that are causing you to waste lots of time. You're mapping ideas about other languages and protocols onto HTML and they just don't fit.

  >  I know very well that tables can't have fixed columns.

Er, not when you first asked the question.

  >  But there are lot more things which are not directly
  >  possible in HTML

No idea what you mean. A thing is either possible in HTML or it isn't.

  >  But still there are ways and means to make it happen.

Good luck!
0
 

Author Comment

by:anupdn
Comment Utility
johnny99
I am Sorry, I am not fighting anyone nor I intend to do so. I just wanted a solution which, (let me put it this way) can solve this problem 'logically', if not 'directly', just like you and others correctly figured out the usage of frames or by splitting the table.These are not direct ways, I mean these are some of the 'creative' approaches for this problem, which too, I am afraid, has loopholes !
> but you're making assumptions about HTML that are causing you to waste lots of time

Thanks for your advise. In fact I did waste some time on this, but it was very important for me then.

Cheers
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

728 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

10 Experts available now in Live!

Get 1:1 Help Now