From: Andrew Poulos on 7 Jan 2010 20:35 PNG with an alpha channels needs something with this elem.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + filename + "', sizingMethod='image')"; to get the transparency to not show. This link <url: http://msdn.microsoft.com/en-us/library/ms532847%28VS.85%29.aspx#Scripting_Filters > indicates that to dynamically add as part of the filter collection I should be able to do c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = filename; c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod = "image"; Alas, IE 6 gives me "Unspecified error". I can't set the style.filter property because I think that will overwrite the filter that already exists on the element. Andrew Poulos
From: Thomas 'PointedEars' Lahn on 8 Jan 2010 04:27 Andrew Poulos wrote: > PNG with an alpha channels needs something with this > > elem.style.filter = > "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + filename + > "', sizingMethod='image')"; > > to get the transparency to not show. Probably you mean "to show". > This link > <url: > http://msdn.microsoft.com/en > us/library/ms532847%28VS.85%29.aspx#Scripting_Filters > > > indicates that to dynamically add as part of the filter collection I > should be able to do > > c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = > filename; > c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod > = "image"; > > Alas, IE 6 gives me "Unspecified error". In which line? If the references work (don't breed Reference Worms[tm]!), and `filename' is not the culprit, use "crop" for `sizingMethod' instead; I have never used "image" to do this, it is the (documented) default value anyway. <http://msdn.microsoft.com/en-us/library/ms532920%28VS.85%29.aspx> > I can't set the style.filter property because I think that will > overwrite the filter that already exists on the element. (Told you.) It will if you do not take care. PointedEars -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee
|
Pages: 1 Prev: FAQ Topic - How do I run a server side script? (2010-01-08) Next: Javascript dummy needs help. |