Wouldnt it be easier to save your images as .gif becuase .png's are not supported by all browsers!
Main Topics
Browse All TopicsI'm using semi-transparent png files in DW MX 2004, by using the alphaloader filter i'm able to kill the grey background in IE using the following
<img src="images/blank.gif" style="width: 103px; height: 138px; filter:progid:DXImageTrans
but when I'm doing rollover images for the buttons the destination png file is still coming up with the grey background bug. How do I keep this from happening during an image swap?
Thank you in advance
JTCollins
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Havin it, yes, thats about the way of it, MX 2004 does have a behaviour tab that allows image swap out though.
Here is the code I have so far
onMouseOver="MM_swapImage(
I tried:
onMouseOver="MM_swapImage(
per your suggstion but afterwards it would not do a image swap at all.
phirana, I currently have them as .gif but am unhappy with the image quality and the blockyness of the transparency. I know the alphaloader only works on IE 5.5 and later, but I am comfortable with this. Thank you though.
I'm thinking about just putting the png in flash and using swf instead, but if anyone has another suggestion I'd be happy to hear it.
Thanks for all the help so far.
JTCollins
JT, the problem is you're mis-using a canned script that doesn't do what you need it to; that script is for changing the 'img src=' attribute, whereas what you need to swap is a CSS style attribute. That script will replace the image ref'd in the HTML (blank.gif) with the string "filter:progid:DXImageTran
Here's an example of how to do it:
<html>
<head><title>Transparency Swap</title>
<script>
function swapTrans(obj,img) {
obj.style.filter = 'progid:DXImageTransform.M
}
</script>
</head>
<body>
<img src="blank.gif" style="width: 103px; height: 138px; filter:progid:DXImageTrans
onmouseover="swapTrans(thi
onmouseout="swapTrans(this
</body></html>
Of course this will be pandering to IE only - the normal MM_swapImage script would suffice in other browsers that support PNG Alpha, but then it'd be different HTML code for those browsers too...
Business Accounts
Answer for Membership
by: Havin_itPosted on 2005-08-22 at 02:40:28ID: 14722772
Hi,
lter='prog id:DXImage Transform. Microsoft. AlphaImage Loader(src =\'images/ ContactBW_ over.png\' , width=\"103\" height=\"138\");"
I assume it's the PNG source, ContactBW.png that's being swapped-out. AFAIK Dreamweaver doesn't offer a canned version of that behaviour, so could you show us your code?
The correct way to swap the PNG would be (I guess) along the lines of
onmouseover="this.style.fi