PNG image transparency not working in IE 6.0 or less than 6.0
If you want to use the transperancy then use the following script in your html. Call this function in the image onLoad function....
SCRIPT:
--------
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
function fixPNG(myImage)
{
if ((version >= 5.5) && (version < 7) && (document.body.filters))
{
var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
var imgTitle = (myImage.title) ?
"title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
var imgStyle = "display:inline-block;" + myImage.style.cssText
var strNewHTML = "+ " style=\"" + "width:" + myImage.width
+ "px; height:" + myImage.height
+ "px;" + imgStyle + ";"
+ "filterrogidXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + myImage.src + "\', sizingMethod='scale');\">"
myImage.outerHTML = strNewHTML
}
}
------------------------
For example, if you use the test.png file then the code like this...
img src="http://www.blogger.com/test.png" onload="fixPNG(this)"
Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts
Friday, May 08, 2009
Thursday, May 07, 2009
How can we resolve javascript Error "Operation Aborted"?
This Error will come only if you are using IE 7 or less version. If you are using DOM object inside your page, sometimes it's trying to access the particular "div" tag before it's loading. At that particular time it will through the error. Once you refreshed the page it will work.
Here is the simple solution for this problem. When you include the script in your page, add "defer='defer'" inside the script tag. So your script will look like the following..
Here is the simple solution for this problem. When you include the script in your page, add "defer='defer'" inside the script tag. So your script will look like the following..
script language='javascript' defer='defer' type='text/javascript' src='test.js'
Subscribe to:
Posts (Atom)