Welcome visitor
* Login
* Register
It is currently September 16th, 2019, 12:16 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 3 posts ] 
Author Message
  get table size
PostPosted: July 29th, 2009, 12:39 am 

Posts: 13
hey i have a table that is created dinamically so it could be a very large table. what i want to do is to show scrollbars ONLY when the table reaches some dimensions, otherwise i dont want the scrollers at all, do you know how to get the size of a table?


Top
 Profile  
 
  Re: get table size
PostPosted: July 29th, 2009, 2:51 am 

Posts: 61
alert(document.getElementById('tableId').offsetWidth);


Top
 Profile  
 
  Re: get table size
PostPosted: July 29th, 2009, 4:32 am 

Posts: 55
If the table is inside a div all you need is add this into the style of your div:
<style type="text/css">
#wrapper{width: 66%; height: 44%; overflow: auto;}
</style>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron