Well, I'd like to see a demo of your page using screen the way that you have it in your first post in this thread. In tests here, even when corrected for the missing single quote (') in this line:
document['mydiv].style.width=screen.width+5
It did nothing with a division with both its name and id set to 'mydiv'. If enhanced to do what it appears to be trying to do, it could look like so:
Code:
<script type="text/javascript"> // controls size in most modern browsers
if (document.getElementById){
var obj=document.getElementById('myDiv').style
obj.width=screen.width+144+'px',obj.height=screen.height+45+'px'
}
</script>
<!--[if IE]>
<script type="text/javascript"> // controls size in modern IE
if (document.getElementById){
obj.width=screen.width+5+'px',obj.height=screen.height+40+'px'
}
</script>
<![endif]-->
Then it works with a division with the id of 'myDiv' but, as I expected when I originally saw your code, the size of the division becomes (as the code dictates) larger than the screen size.
The bottom line here though is, if whatever code you had was working, it certainly needn't be changed.
Bookmarks