View Full Version : style.height issue...

10-13-2006, 04:20 PM
Hi all, i have the following function...

function ChangeTextboxSize(size) {

var objBox = document.getElementById("txtComment");
var curHeight = objBox.style.height;


and it should return a height of 90px; as defined in my css, yet it returns an empty alert box...can someone enlighten me as to why??

Thanks, Justin

10-13-2006, 05:00 PM
Its doing exactly what it should. It would only return a value IF you used style="..." inside of that div. To get the css styles from the stylesheet you need to use the methods found here http://www.javascriptkit.com/dhtmltutors/dhtmlcascade.shtml

10-14-2006, 02:00 AM
awesome, thanks so much for the help!! :thumbsup: