Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | Window height/width code (7th Jan 10 at 6:14pm UTC) | |  Code: - <script type="text/javascript">
-
- function Size(SType)
-
- var TypeSize;
-
- switch (SType){
-
- case x:
-
- if (window.innerWidth){
- TypeSize = window.innerWidth
- } else if (document.all){
- TypeSize = document.body.clientWidth
- }
-
- break;
-
- case y:
-
- if (window.innerWidth){
- TypeSize = window.innerHeight
- } else if (document.all){
- TypeSize = document.body.clientHeight
- }
-
- break;
-
- default:
-
- break;
-
- }
-
- return TypeSize;
-
- }
-
- </script>
How would I use this for a table for width and height and would this code work? | |
vF forums: Perfect World RP BLEACH Universe - Under Construction / Testing Phase Xen Qarna RP - Stage I Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled the Final Anime Hideout |
|
dog199200 Guest | Re: Window height/width code (7th Jan 10 at 8:07pm UTC) | | not sure about the code but wouldn't it just be easier using percentage in the height and width area instead of using a JS code | |
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
dog199200 Guest | Re: Window height/width code (7th Jan 10 at 8:35pm UTC) | | ok and if i recall width and height with percentage checks the users res. | |
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Window height/width code (8th Jan 10 at 12:37am UTC) | | document.write(Size(x)); or document.write(Size(y));
| |
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |