IE7 problem

Discussion in 'JavaScript' started by abidbinakhtar, Jul 16, 2008.

  1. #1
    The actual image height is 60 (see attached). The script below alerts image height as 30 in IE7 while it correctly alerts 60 in Firefox. Please help me with the issue.

    <script language="javascript">

    document.write(
    '<table cellpadding="0" cellspacing="0">' +
    '<tr><td align="left"><img src="images/teaser.jpg" name ="teaser" id="teaser" /></td></tr>'+
    '</table>');

    alert(document.images['teaser'].height);
    </script>
     

    Attached Files:

    abidbinakhtar, Jul 16, 2008 IP