473,785 Members | 2,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

opacity

Hi,

I'm trying to get and set an element's opacity, but I'm stuck with,
what a hell of surprise, Internet Explorer. As for getting the
element's opacity, I have the following (not working) lines of code:

if ( targetObject.fi lters && targetObject.fi lters.length 0 )
opacity =
targetObject.fi lters.item("DXI mageTransform.M icrosoft.Alpha" ).Opacity;

Setting it, I tried:

if ( targetObject.fi lters && targetObject.fi lters.length 0 )
targetObject.se tAttribute( "style", "filter: alpha(opacity=" +
opacity + ")" );

None work. I have digged these out from some MSDN article, but they
aren't working, at least they don't work in to me available IE 6.0. Do
you have better (i.e. working) ways of yours?

Thanks

Darko
Nov 19 '07
16 2971
I kind of mucked up that explanation. You would need to maintain your
own gEBID and getAnElement to have your level of support for IE4. The
logic that a developer with uncommon requirements maintains his own
implementations was the point.
Sounds good to me.
Dec 7 '07 #11
David Mark wrote:
On Dec 7, 6:52 pm, Peter Michaux <petermich...@g mail.comwrote:
>On Dec 7, 3:32 pm, David Mark <dmark.cins...@ gmail.comwrote:
>>This is similar to Thomas' oft-mentioned isFeatureType function, but
is slightly in improved in that it does the truthy test internal and
covers ActiveX methods. Point to PointedEars. On the downside, the
fact that I am agreeing with him
It's contagious.

I hope not.
>>may signal the end of the world.
:-)

This is how it starts. Next thing you know, people will start
agreeing with VK. I think one of Nostradamus' quatrains referenced
such events as a prelude to the apocalypse.
Generally, understanding will be helped greatly by considering the argument
before the name. That is where many people fail to make the distinction.
PointedEars
Dec 8 '07 #12
On Dec 7, 4:26 am, "Thomas 'PointedEars' Lahn" <PointedE...@we b.de>
wrote:
David Mark wrote:
[...] Thomas 'PointedEars' Lahn [...] wrote:
David Mark wrote:
On Dec 6, 3:02 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:
David Mark wrote:
[snip]
>This is because there is no reliable way to determine if host object
>methods are callable.
It would seem there is. There does not seem to be a reliable way yet to
How do you figure?
Because evaluating the type before and trying read access only if the type
indicates feasibility has not caused unexpected behavior so far.
And if you get typeof(o) == 'object', how does that tell you it is
callable?

If I get that result and *then* the value is not a false-value and I
am expecting the identifier to designate a host object's method, at
the least I can be pretty sure that it is callable.
That seems reasonable.

[snip]

--
Peter
Code Worth Recommending Project
http://cljs.michaux.ca
Dec 12 '07 #13
On Dec 8, 5:13 am, David Mark <dmark.cins...@ gmail.comwrote:
On Dec 8, 6:01 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:
[snip]
[...]
I tested with the first posted example. No problem.
You have tested with a subset of user agents and leap to the conclusion that
there can never be a problem.

You have snipped out the context of that quote. It referred to the
testing of ActiveX methods. And I tested with virtually every version
of Windows IE, which is the only browser that exposes ActiveX
methods. If you think there is a problem related to the global/window
issue that you keep coming back to, that is another matter (and I
still disagree with you.)
Were these IE browser versions all on the same install of windows? I
am getting more sceptical of this type of testing lately.
Unfortunately a solution costs real dollars :-S

--
Peter
Code Worth Recommending Project
http://cljs.michaux.ca
Dec 12 '07 #14
On Dec 11, 8:08 pm, Peter Michaux <petermich...@g mail.comwrote:
On Dec 8, 5:13 am, David Mark <dmark.cins...@ gmail.comwrote:
On Dec 8, 6:01 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:

[snip]
[...]
I tested with the first posted example. No problem.
You have tested with a subset of user agents and leap to the conclusion that
there can never be a problem.
You have snipped out the context of that quote. It referred to the
testing of ActiveX methods. And I tested with virtually every version
of Windows IE, which is the only browser that exposes ActiveX
methods. If you think there is a problem related to the global/window
issue that you keep coming back to, that is another matter (and I
still disagree with you.)

Were these IE browser versions all on the same install of windows? I
Yes.
am getting more sceptical of this type of testing lately.
There can be issues, like the DirectX opacity "library not registered"
snafu (which can safely be ignored unless you are worried about
developers' test machines.) I have the ActiveX feature testing on
Win98 in the past though.

And I can't get IE4 to work at all on my primary test machine. No
idea why. IE3 works (sometimes) and I use it to make sure that
scripts degrade properly as virtually nothing I write will enhance
pages in that browser.
Unfortunately a solution costs real dollars :-S
I've got enough machines, but I don't feel like uninstalling IE6/7
from any of them as I worry it will screw up Windows or other
applications. I still have a Win98 box, but I haven't turned it on in
years. If I determine that the multiple IE on XP approach has
problems I can't work around or discount, perhaps I will uninstall IE6
on the Win98 box and use it to test IE5.x.
Dec 12 '07 #15
In comp.lang.javas cript message <1f7731f6-6ef8-4c28-8ce0-9c531ac0eb85@d2
1g2000prf.googl egroups.com>, Tue, 11 Dec 2007 17:15:45, Peter Michaux
<pe**********@g mail.composted:
>Code Worth Recommending Project
http://cljs.michaux.ca
I've looked at this, and have seen no indication of how to find code.
To the incomer, it looks like an amusement park for experts, of no
practical use. IMHO, it should be rapidly seeded with some known-not-
too-bad code (which can be improved later, if needed), so that it can be
seen, rapidly, to be of some possible use.

International forms should be used in all cases, not merely local ones.
This, in <http://cljs.michaux.ca/trac/timeline>, the date sequence looks
ludicrous to all non-Americans. Use YYYY-MM-DD, as in ISO 8601 - even
Americans can understand it, and there's no need for them to like it.

Page <http://cljs.michaux.ca/trac/changeset/8and no doubt others - in
my IE6, the monospace text is unreasonably small. Zoom does not work.

Search results : unreadably small, no Zoom, FFF dates.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demo n.co.uk/- FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "" (SonOfRFC1036)
Dec 12 '07 #16
On Dec 12, 3:17 pm, Dr J R Stockton <j...@merlyn.de mon.co.ukwrote:
In comp.lang.javas cript message <1f7731f6-6ef8-4c28-8ce0-9c531ac0eb85@d2
1g2000prf.googl egroups.com>, Tue, 11 Dec 2007 17:15:45, Peter Michaux
<petermich...@g mail.composted:
Code Worth Recommending Project
http://cljs.michaux.ca

I've looked at this, and have seen no indication of how to find code.
There are two ways on the front page: a browse source link and a
subversion command to get the code. Sure one day the project may be a
success and deserve a flashy page but that is not a priority right
now, at least for me.
To the incomer, it looks like an amusement park for experts, of no
practical use. IMHO, it should be rapidly seeded with some known-not-
too-bad code (which can be improved later, if needed), so that it can be
seen, rapidly, to be of some possible use.
Having code in the repository is a priority and it will be there at
least "rapidly" on a geological scale. There is no time line for the
project.
International forms should be used in all cases, not merely local ones.
This, in <http://cljs.michaux.ca/trac/timeline>, the date sequence looks
ludicrous to all non-Americans. Use YYYY-MM-DD, as in ISO 8601 - even
Americans can understand it, and there's no need for them to like it.
trac is a prepackaged piece of software that is good on the whole.
Page <http://cljs.michaux.ca/trac/changeset/8and no doubt others - in
my IE6, the monospace text is unreasonably small. Zoom does not work.

Search results : unreadably small, no Zoom, FFF dates.
This is not a priority, at least for me. I can read the pages just
fine and know how to adjust my browser when that is not the case with
some pages on the web. If you are passionate about this and want to
find the CSS that causes the problem. You can send a patch.

--
Peter
Code Worth Recommending Project
http://cljs.michaux.ca/
Dec 13 '07 #17

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

Similar topics

1
4784
by: Dean Edwards | last post by:
I am attempting to change the opacity of an image. I can modify opacity ok: function flip(pic, opacity){ pic.style.filter = 'alpha(opacity='+opacity+')'; } But I'm not familiar with javascript. How can I read the existing opacity value?
0
3913
by: kaeli | last post by:
All, The following is an example of what I'm trying to do: I have a box set to be partially transparent. I want the text in the box to NOT be partially transparent. This works in IE, but NN7 has the text still at 75% opacity. Can anyone tell me what I'm doing wrong? TIA. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
3
10231
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 in practical real life situations. The soon forthcoming CSS3 recommendation does not serve the public interests in this area not at all. The problem relies in the definition what opacity is, how it is to applied to page elements. In past 5...
6
3721
by: Robert A. Boudra | last post by:
As you will probably guess, I'm just starting out with VB.net although I'm a long time VB developer. I was playing around with the Opacity property of a form and have found that I can set the property at design time or in code just fine, but as soon as I move the form to a new location on the screen, it becomes completely opaque. If I then try to set the opacity property again, I get an error message. Any idea what's going wrong? Bob
1
2637
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 activate the script. In the same cell are some links listed and when you move the cursor over the links the image starts to flicker. This is because of the getElementById that identifies each link as an object. Anyone knows how I can solve...
2
2348
by: reidarT | last post by:
I want a windows form to act like the one in Outlook when you get a new message and it is visible for about a couple of seconds and then the opacity decreases and the form dissapears in the end I have tried with Dim p As Integer Dim Vent As Integer For p = 100 To 0 Step -1 Me.Opacity = p For Vent = 1 To 100000
15
3728
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 element in Firefox.
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10153
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.