Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adjusting window width to table width
Message
From
02/08/2001 11:16:25
 
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00538712
Message ID:
00538864
Views:
10
>>>>Is there a way to adjust the window width based on the table width? The table width may vary based on the length of some fields. I would like the browser window to adjust based on it.
>>>
>>>In java script you can use self.resizeto(width,height) to set the window size. So if you set the table width to 'width=710' you should be able to use the same 710 in the java code self.resizeto(720,200).
>>
>>We do not know the table width. It's size may vary depending on the column content. I was looking mostly for a function such as Table.Width.
>
>That I have never done, but the Windows document object model should let you query for the value of the table width. Document.TableName.Width Where TableName is the name you gave your table. But that may be only for Internet Explorer and if you have netscape users then it may not work.

The trick is to include an image which will fill all the columns in the table with a width of 100% and a height of 0 and use:

document.images['Test'].width

where Test may be the name of the image. Now, it's just a question of not showing that row.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform