[Javascript] Re: Getting the width property of div

Shawn Milo shawn.milo at gmail.com
Tue Apr 5 12:25:12 CDT 2005


Forgive me if I'm missing something, but this seems to return 80 or
NaN  for everything. Are you sure this is returning the width?

Shawn

On Apr 5, 2005 1:15 PM, Dash <forgetful54341087097153001984 at hotmail.com> wrote:
>  
> >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 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 
> 


-- 
Voicemail any time at:
206-666-MILO



More information about the Javascript mailing list