Friday 28 October 2011

window opener property

The opener property returns a reference to the window that created the window.For example to get the id of the element present in the parent window, we should use like this

window.opener.document.getElementById('video')

Reference: http://www.w3schools.com/jsref/prop_win_opener.asp

Tuesday 25 October 2011

PNG transparency problem in IE6

I think most of the web developers have headache using PNG image in IE6 when the client asks for IE6 support.
To overcome this issue please refer the beow link.
http://www.dillerdesign.com/experiment/DD_belatedPNG/

The idea here is let say you are placing a  image in a div or tag. We need to pass the id or class to the javascript function like this DD_belatedPNG.fixPng(yourElement).

Please refer http://support.microsoft.com/kb/294714 for microsoft's approach to the problem.

When applying this fix , you may encounter error in IE8 like this (Message: Invalid argument. Line: 13 Char: 461). To avoid this, add a meta tag forcing IE in to compatibility mode(http://wordpress.org/support/topic/js-error-messages-in-ie8).

meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"

Below are the other remedies for this problem
http://jquery.khurshid.com/ifixpng.php
http://jquery.andreaseberhard.de/pngFix/
http://plugins.jquery.com/project/iepngfix