Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dynamic Column Resize

Posted on 2002-03-13
4
Medium Priority
?
589 Views
Last Modified: 2008-02-01
I am looking for examples of how to dynamically resize html table columns.  Code or links would be great.

-bb
0
Comment
Question by:xlr8tn
[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 Comments
 
LVL 9

Accepted Solution

by:
AlfaNoMore earned 200 total points
ID: 6861362
var objTable = document.getElementById('name');
var firstCol = objTable.rows[0];
var objCells = firstCol.cells;
for(i=0; i<objCells.length; i++){
    objCells[i].width = 25;
}

Now, this is DOM 3 specific, but there are some IE 5.5 alterations that can be applied. Unfortunately NN4.7 or less is unable to reference a table as an object, so there's no hope for it. NN6 uses DOM 3, so the above code will work.

I'm off home now, but sure someone could provide an IE 5.5 equivalent?
0
 

Author Comment

by:xlr8tn
ID: 6862956
Thanks,
I am currently using IE6.0 and Netscape 6.2 so it should work.  I'll give it a try.
0
 
LVL 12

Expert Comment

by:ahosang
ID: 8076350
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

points to AlfaNoMore
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
ahosang
EE Cleanup Volunteer
0
 

Expert Comment

by:modulo
ID: 8139795
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

721 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