I'm afraid I'm having difficulty with what should be a fairly fundamental task: obtaining the properties of a DIV object at run time.<br><br>Using a standard style sheet, which names position AND size for a DIV (<FONT FACE=monospace>#TestDIV {left: 100px; top: 20px; width: 100px; height: 20px;}</font> ), I embed a standard DIV into an HTML page:<br><br><FONT FACE=monospace><DIV ID="TestDIV"><br><SELECT NAME="TestComboBox"><br><OPTION VALUE="One">One</OPTION><br><OPTION VALUE="Two">Two</OPTION><br></SELECT><br></DIV></font><br><br>The DIV initially appears correctly. The problem is, I can't get its attributes properly later. Here's how I am trying:<br><br><FONT FACE=monospace>function GetDIVObject(strID)<br>{<br> var Object = null ;<br><br> switch (g_iBrowser)<br> {<br> case 1 : // IE.<br> Object = document.all[strID].style ;<br> break ;<br><br> case 2 : // Netscape.<br> Object = document.layers[strID];<br> break ;<br> }<br><br> return Object ;<br>}</font><br><br>And then I am trying to see the values:<br><br><FONT FACE=monospace>var Object ;<br><br>Object = GetDIVObject("TestDIV"<br>document.writeln("" + Object.xxx);</font><br><br>In Netscape, "left" and "top" correctly return 100 and 20, but "width" and "height" return "undefined".<br>In IE, "pixelLeft" and "pixelTop" return 0, and "pixelWidth" and "pixelHeight" return either "undefined" or a blank (I can't remember which right now).<br><br>What am I doing wrong?<br><br>(Sorry about the length of the question, I needed to give as much info as possible).<br><br>