[Javascript] Determining the window sizes

Trev and Liz Smith trevnliz at optusnet.com.au
Mon May 28 06:53:41 CDT 2007


I am relatively new to JavaScript but am able to find my way round the 
DOM model OK.
I am trying to write scientific calculations in JavaScript and plot the 
results.
I have a set of plotting functins OK but I want to size the graphs to 
fit nicely on the page with other text etc.
To do this I need to find the space available to me on the user's screen 
at run time.
I am finding it difficult to get the available area's dimensions in pixels.
Can someone help me by advising me where and when to get the 
window.document.body.clientWidth property?

Regards,
Trevor
 




More information about the Javascript mailing list