Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript how to get columns width for html table based on subfile

arkady

Coder
I have an application based on subfile from AS400. It has several columns with dynamic data width. I need help on how to get the current width of every column and assign it to individual header containers, so headers and columns will be in sync.

here is a sample:

header1 header2 header3

r1c1, r1c2, r1c3

r2c1, r2c2, r2c3

r3c1vvvvvvv, r3c2mmmmmm, r3c3xxxxxxxx
I need a script to set width of header1 the max width of column 1 which is "r3c1vvvvvvv", width of header2 to the max width of column 2 which is "r3c2mmmmmm' etc.
 
Last edited:
I have an application based on subfile from AS400. It has several columns with dynamic data width. I need help on how to get the current width of every column and assign it to individual header containers, so headers and columns will be in sync.

here is a sample:

header1 header2 header3

r1c1, r1c2, r1c3

r2c1, r2c2, r2c3

r3c1vvvvvvv, r3c2mmmmmm, r3c3xxxxxxxx
I need a script to set width of header1 the max width of column 1 which is "r3c1vvvvvvv", width of header2 to the max width of column 2 which is "r3c2mmmmmm' etc.
Hi there,
Could you share the snippet of code you're having issues with? It would make it easier for anyone willing to help to be able to diagnose the issue and provide the best guidance
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom