Hello, iv’e been experimenting with javascript to create quite a simple little applet on a web page.
What i want is a little script that will run on Internet explorer that will find out the dimensions of the browser window. I need this to refresh or update when i resize the window. That’s it!
So far iv’e been instructed that i can use these variables to get the dimensions:
[B]Netscape:
window.innerWidth, window.innerHeight
[B]IE:
document.body.clientWidth, document.body.clientHeight
Playing about with these i could get the Netscape commands to display the dimensions in firefox but they would not update when i resized the window. This is the code i used:
[I]<script>
[I]var x = window.innerWidth
[I]var y = window.innerHeight
[I]document.write( x+ “, “+ y);
[I]</script>
trying the IE commands, it just gave me a blank page.
If someone can provide any help i’d greatly appreciate it. The purpose of this code is for testing purposes. It will be used to help me resize thousands of pop-up windows on an e-commerce site.