[Javascript] Re: Getting the width property of div

Dash forgetful54341087097153001984 at hotmail.com
Tue Apr 5 12:15:47 CDT 2005


>Wow, who would have thought that this would be such a complex question?

I don't think it is! parseInt because some brwsers might return a string with px on the end or something.

function hi(layerID){
    var width=parseInt(document.getElementById(layerID).style.width);
    alert(width);
}

Dash xx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050405/885597d6/attachment.htm>


More information about the Javascript mailing list