Dynamic opacity

S

Simon

In IE I have a routine that dynamically assigns objects' opacity. This works
fine for some elements but not for others.
It works for buttons and inputs but not for img, span and select.

This is the line that sets opacity from a loop through all elements:

document.forms[0].elements.style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opacity=" + FadeOpacity + ")";

Any ideas?

Thanks IA, Simon
 
M

Martin Honnen

Simon said:
In IE I have a routine that dynamically assigns objects' opacity. This works
fine for some elements but not for others.
It works for buttons and inputs but not for img, span and select.

This is the line that sets opacity from a loop through all elements:

document.forms[0].elements.style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opacity=" + FadeOpacity + ")";

Any ideas?


Have you looked at the documentation on msdn.microsoft.com?
http://msdn.microsoft.com/library/d.../author/dhtml/reference/properties/filter.asp
It clearlys says that "an object must have layout for the filter to
render". There are ways to achieve that for instance setting height
and/or width on an element.
And at the end of the page elements are listed to which filter can be
applied, the <select> element is not listed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top