473,395 Members | 1,504 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,395 software developers and data experts.

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:DXImageTransform.Microsoft.AlphaImag eLoader(src='/core/images/arrow.png',
sizingMethod='crop') }
..arrowRight {
filter:progid:DXImageTransform.Microsoft.AlphaImag eLoader(src='/core/images/arrowRight.png',
sizingMethod='crop') }

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 objArrowContainer = document.createElement( 'table' );
var objTableBody = document.createElement( 'tbody' );
var objArrowRow = document.createElement( 'tr' );
var objArrowLeft = document.createElement( 'td' );
var objArrowRight = document.createElement( 'td' );
if ( this.user.imageURL )
{
var objIcon = new Image();
objIcon.src = ( this.user.imageURL.substring( 0, 7 ) == 'http://' ) ?

this.user.imageURL : domain + this.user.imageURL;
objArrowLeft.appendChild( objIcon );
}
objArrowLeft.className = 'arrowLeft';
objArrowRight.className = 'arrowRight';
objArrowContainer.className = 'arrowContainer';
objArrowLeft.appendChild( document.createTextNode( this.user.forename
) );
objArrowRight.appendChild( document.createTextNode( " " ) );
objArrowRow.appendChild( objArrowLeft );
objArrowRow.appendChild( objArrowRight );
objTableBody.appendChild( objArrowRow );
objArrowContainer.appendChild( objTableBody );
objArrowContainer.id = this.user.username;
objArrowContainer.onmousedown = function( e )
{
objDragged = objArrowContainer;
docMouseMove( e );
return false;
};
objArrowContainer.style.left = ( coords.x + ARROW_OFFSET.x ) + "px";
objArrowContainer.style.top = ( coords.y + ARROW_OFFSET.y ) + "px";
this.objElement = objArrowContainer;
}
// Altering the opacity

if ( arrowArray[i].objElement.style.MozOpacity != null)
{ arrowArray[i].objElement.style.MozOpacity = arrowAlpha; }
if ( arrowArray[i].objElement.style.opacity != null)
{ arrowArray[i].objElement.style.opacity = arrowAlpha; }
if ( arrowArray[i].objElement.style.filter != null)
{
var ieOpacity = Math.round( arrowAlpha * 100 );
arrowArray[i].objElement.style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opaci ty=" + ieOpacity + ")";
}

Nov 4 '05 #1
1 1781
I've just tried adapting the code to add the AlphaImageLoader 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
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...
0
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...
6
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=>...
5
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...
2
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...
2
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...
4
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
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...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
0
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...
0
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...

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.