473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dynamic opacity

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[i].style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opaci ty=" + FadeOpacity + ")";

Any ideas?

Thanks IA, Simon
Jul 20 '05 #1
1 1567


Simon wrote:
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[i].style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opaci ty=" + FadeOpacity + ")";

Any ideas?


Have you looked at the documentation on msdn.microsoft.com?
http://msdn.microsoft.com/library/de...ies/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.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon | last post by:
Am using the following code. <script language="JavaScript1.2"> function setquantity(productindex,productquantity) { //create the reference object irefname_none = eval("document." +...
3
by: Marek Mänd | last post by:
This posting will express my concern about the future of css3 forthcoming recommendation. I think for long time now, that the current implementation of CSS attribute opacity is less than usable...
1
by: VK | last post by:
Formally it may appertain to a CSS newsgroup, but from the other side it is *dynamic* plus it is JavaScript based. Anyway I had a customer who wanted cross-browser full-Aqua (Office XP style) so...
1
by: mhoeneveld | last post by:
I am writing a small script to fade the opacity of an image/object. The script itself works fine only I do have some unwanted behaviour. I do use a tablecell object and the mouseover/mouseout to...
3
by: maya | last post by:
I'm trying to chg opacity for some divs on a pg, IE is ignoring it.. (works fine in FF..) why is this.. html, css, JS code is here.. http://www.francesdelrio.com/opacity.html this is for...
4
by: =?Utf-8?B?R29yZnk=?= | last post by:
Hey everyone. This is only my first week with C#, but I use actionscript a lot in Flash, so I have a very basic understanding of programming, but bear with me... I am trying to create a...
15
by: Sunny | last post by:
Hi, I can change the lement opacity in IE using. abc.style.filter = 'alpha(opacity=' + 10 + ')'; But this dont work in firefox, In firefox it throws error. How I can change the opacity of an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.