>We have a situation where we have an IFrame on a page which contains a >table. We need to set the width of the table to the width of the window >(the frame's parent document), scrolling the frame if necessary. We have >tried using window.width, with no luck. Searches of the web finds >references that IE doesn't allow access to the window properties after it's >been rendered (we could grab the height/width when the window is being >created, but we cannot control who/what objects will call this window). >Also, all the sample code we've seen online uses screen. > >I'm sure there's a way to do this, but the obvious methods don't seem to be >working. Unless we've missed something even simpler... > >Any tips or suggestions are appreciated.
I use this code on one of my sites to determine the width and height... got it from Javascript.internet.com so I'm including the entire cut and paste code... HTH <!-- TWO STEPS TO INSTALL SCREEN PERCENTAGE: 1. Include the first code in the HEAD of your HTML document 2. Copy the coding into the BODY of your HTML document --> <!-- STEP ONE: Add this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Idea by: Giulio Gravinese --> <!-- Web Site: http://www.universeg.com --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin // IE Compatability by Errol Burrow ([EMAIL PROTECTED]) function getwindowsize() { if (navigator.userAgent.indexOf("MSIE") > 0) { var sSize = (document.body.clientWidth * document.body.clientHeight); return sSize; } else { var sSize = (window.outerWidth * window.outerHeight); return sSize; } return; } // End --> </script> </head> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <center> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var percent = Math.round((getwindowsize()/(screen.width * screen.height)*100) * Math.pow(10, 0)); document.write("This window is using about " + percent + "% of your available screen."); // End --> </script> </center> <p><center> <font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> <!-- Script Size: 1.45 KB --> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

