473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Contents vanish when changing opacity of table (IE)

I've used JavaScript DOM scripting to create a table element and alter
its opacity. Bizarrely, the contents of the table appear to vanish when
the opacity changes.

One important note is that I am using transparent PNGs as background
images of elements within the table. The following CSS is used to style
two elements within the table:

..arrowLeft {
filter:progid:D XImageTransform .Microsoft.Alph aImageLoader(sr c='/core/images/arrow.png',
sizingMethod='c rop') }
..arrowRight {
filter:progid:D XImageTransform .Microsoft.Alph aImageLoader(sr c='/core/images/arrowRight.png' ,
sizingMethod='c rop') }

Is the vanishing problem a bug in Internet Explorer? And if so, I'd be
grateful if you could help me find a workaround.

In the example on the URL below, the beige arrows on the photo are the
tables in question, and you will observe their contents vanishing when
you mouse in and out of the photo (which should fade them in and out).

http://testing.chrisbeach.co.uk/core...er.php?ID=6572

Below are snippets of code used to create the tables and their contents
(which form the arrows), and also the code used to alter the opacity:

// Creating the table (arrow) and contents
function Arrow( user, coords )
{
this.user = user;
this.coords = coords;
var objArrowContain er = document.create Element( 'table' );
var objTableBody = document.create Element( 'tbody' );
var objArrowRow = document.create Element( 'tr' );
var objArrowLeft = document.create Element( 'td' );
var objArrowRight = document.create Element( 'td' );
if ( this.user.image URL )
{
var objIcon = new Image();
objIcon.src = ( this.user.image URL.substring( 0, 7 ) == 'http://' ) ?

this.user.image URL : domain + this.user.image URL;
objArrowLeft.ap pendChild( objIcon );
}
objArrowLeft.cl assName = 'arrowLeft';
objArrowRight.c lassName = 'arrowRight';
objArrowContain er.className = 'arrowContainer ';
objArrowLeft.ap pendChild( document.create TextNode( this.user.foren ame
) );
objArrowRight.a ppendChild( document.create TextNode( " " ) );
objArrowRow.app endChild( objArrowLeft );
objArrowRow.app endChild( objArrowRight );
objTableBody.ap pendChild( objArrowRow );
objArrowContain er.appendChild( objTableBody );
objArrowContain er.id = this.user.usern ame;
objArrowContain er.onmousedown = function( e )
{
objDragged = objArrowContain er;
docMouseMove( e );
return false;
};
objArrowContain er.style.left = ( coords.x + ARROW_OFFSET.x ) + "px";
objArrowContain er.style.top = ( coords.y + ARROW_OFFSET.y ) + "px";
this.objElement = objArrowContain er;
}
// Altering the opacity

if ( arrowArray[i].objElement.sty le.MozOpacity != null)
{ arrowArray[i].objElement.sty le.MozOpacity = arrowAlpha; }
if ( arrowArray[i].objElement.sty le.opacity != null)
{ arrowArray[i].objElement.sty le.opacity = arrowAlpha; }
if ( arrowArray[i].objElement.sty le.filter != null)
{
var ieOpacity = Math.round( arrowAlpha * 100 );
arrowArray[i].objElement.sty le.filter =
"progid:DXImage Transform.Micro soft.Alpha(opac ity=" + ieOpacity + ")";
}

Nov 4 '05 #1
1 1794
I've just tried adapting the code to add the AlphaImageLoade r every
time the opacity changes -- this hasn't worked. The content of the
table still disappears

any suggestions?

Nov 4 '05 #2

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

Similar topics

6
50908
by: Andy Smith | last post by:
I am trying to get a background within a table transparent. I am using: style="filter:alpha(opacity=65);" The only problem is that everything within the table is now faded. Not my intention. I would just like the background the be semi-transparent. Any help would be greatly appreciated. Andy
0
3910
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"
6
10817
by: sentinel | last post by:
Hi, I’m trying to modify a DHTML editor that parses a style-sheet via PHP and instead of modifying the tags via execCommand(), find a way of writing inline styles by way of adding <span style=> tags around the selected text. Easier said than done. My first though was to do a search and replace on the innerHTML, but falls down if there is more than one match (it will only modify the first occurrence). I suspect that even if I could
5
2904
by: Webmaster | last post by:
The following style sets the opacity or semi-transparency in Mozilla and Explorer browsers for an image: #myImage{ filter: alpha(opacity=50); -moz-opacity:0.50; opacity: 0.50; } <img src="someimage.jpg" name="myImage" id="myImage"> The alpha(opacity=50 does it in IE and the opacity: 0.50 does it Mozilla.
2
2356
by: Eric Lindsay | last post by:
Can someone point me to a good explanation of how to use opacity? From CSS 3 http://www.w3.org/TR/2003/CR-css3-color-20030514/#opacity which I read to mean just set a decimal value between 0 and 1 I tried using opacity: 0.50; and it appeared to work as expected in Safari and Firefox, but not in Opera. Does it actually work in any version of IE? Does it degrade harmlessly like in Opera? I also noticed the use of filter:...
2
1709
by: Peter Michaux | last post by:
Hi, I've been trying to get opacity reporting working in IE 5.5 but the Microsoft documentation does seem to work as I interpret it even though this documentation page seems have been written for IE 5.5 <URL: http://msdn.microsoft.com/workshop/author/filter/filters.asp> In the html page listed below I see an error "Library not registered" in IE 5.5. In IE 6 I see an alert that says "50" as expected.
4
3030
by: Amer Neely | last post by:
I have a p tag defined as ..nav_current { opacity:.5; } which works fine in Mozilla, but IE doesn't act on it. Any way to get it to work? --
16
2952
by: Darko | last post by:
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.filters && targetObject.filters.length 0 ) opacity = targetObject.filters.item("DXImageTransform.Microsoft.Alpha").Opacity;
15
3710
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
8427
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
8850
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8626
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
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...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
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
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
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

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.