try

document.body.scrollWidth

that should do it.  it also takes into account any padding in the document
itself

Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ryan Sabir
Sent: Monday, August 30, 2004 3:57 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: OT: javascript document width


Hmmm, not quite...

Here is an example of what I want:

http://www.newgency.com/testwidth.cfm

I have a table of width 20000px on that page, I want to know how wide
the HTML document is, which I would expect be a bit greater than
20000.

The javascript you gave me relates to the size of the browser window.

thanks, bye!

Monday, August 30, 2004, 1:53:10 PM, you wrote:


SO> full width of the browser including borders
SO> <script>document.write(document.body.offsetWidth);</script>

SO> inside with of the browser document
SO> <script>document.write(document.body.clientWidth);</script>


SO> Steve

SO> -----Original Message-----
SO> From: [EMAIL PROTECTED]
SO> [mailto:[EMAIL PROTECTED] Behalf Of Ryan Sabir
SO> Sent: Monday, August 30, 2004 1:29 PM
SO> To: CFAussie Mailing List
SO> Subject: [cfaussie] OT: javascript document width


SO> Hi all,

SO> Anybody know how I can determine the width of the current document
SO> using javascript? There are plenty of ways to determine the width of
SO> the current window.. but I have a horizontally scrolling document that
SO> I want to find the width of... I know it's around 60,000 pixels wide
SO> at the moment, but I need an exact figure at runtime.

SO> any ideas?

SO> thanks

SO> -----------------------
SO> Ryan Sabir
SO> Newgency Pty Ltd
SO> 2a Broughton St
SO> Paddington 2021
SO> Sydney, Australia
SO> Ph (02) 9331 2133
SO> Fax (02) 9331 5199
SO> Mobile: 0411 512 454
SO> http://www.newgency.com/index.cfm?referer=rysig


SO> ---
SO> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
SO> To unsubscribe send a blank email to
SO> [EMAIL PROTECTED]
SO> Aussie Macromedia Developers: http://lists.daemon.com.au/



SO> ---
SO> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
SO> To unsubscribe send a blank email to
[EMAIL PROTECTED]
SO> Aussie Macromedia Developers: http://lists.daemon.com.au/


-----------------------
Ryan Sabir
Newgency Pty Ltd
2a Broughton St
Paddington 2021
Sydney, Australia
Ph (02) 9331 2133
Fax (02) 9331 5199
Mobile: 0411 512 454
http://www.newgency.com/index.cfm?referer=rysig


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to