Solved

Dynamic Column Resize

Posted on 2002-03-13
4
588 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 50 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

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

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…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
Suggested Courses

627 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