SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jun 2007
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DD_belatedPNG, help?

    I stumbled across a great png fix for IE 6: which can be found on this page.

    The script seems to be working great, but it shows an error 'this.imgSize[...].width' is null or not an object. However, the script is indeed doing it's job and all transparent pngs are rendered as intended and unlike most scripts - its rendering them fast even with lot of images + allows background repeats and position, but because of this JavaScript error some other JS scripts below it are not running - otherwise I'd have ignored this.

    I'm not a JS expert - I tried to see what the problem might be, but the complex code made no sense to me. So, I figured this error might be popping up because some images and css backgrounds doesn't have fixed width in them - so as an experiment I added width to all the appropriate elements, still same error, I tried inline width - still no luck.

    The script works perfectly for me and faster than the htc alternative. Got any suggestions?

    Note: I tried emailing the author, no response.

  2. #2
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I received the same error. Not sure our scenario is the same, but possibly this will help.

    Right or wrong, I applied the fix to everything using this code:
    Code:
    DD_belatedPNG.fix('*');
    This previously worked on dozens of sites to quickly fix IE6 PNG support. The difference with the site that the error appeared was that it had a background image on the html tag. Once I removed the background image, the error went away.

    Another approach that worked was to add "body" before the "*" in the PNG fix:
    Code:
    DD_belatedPNG.fix('body *');
    Hope that helps you and anyone that stumbles upon this.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •