Opera won't change the style information when I change classname

T

torbs

Hi

I have two quicktime players. I load them like this:

<object id="'movie" class="synligActiveXSpille" (...)
<embed name="movie class="SynligSpiller (...)

References to the two players are kept in the properties of the object
..loadingPlayer and .activePlayer.

In the style sheet the class (u)synligActiveXSpiller changes only the
z-index, while the (u)synligSpiller changes the visibility property.

I have this callback function. The "thisElement" reference is simply
the object (this):

moviePlayer.prototype.switchPlayer = function (thisElement) {

if (thisElement.activePlayer.className == "synligSpiller") {
thisElement.activePlayer.className = "usynligSpiller";
thisElement.loadingPlayer.className = "synligSpiller";
thisElement.loadingPlayer.Stop();
thisElement.loadingPlayer.Play();
} else if (thisElement.activePlayer.className ==
"synligActiveXSpiller") {
thisElement.loadingPlayer.className =
"synligActiveXSpiller";
thisElement.activePlayer.className =
"usynligActiveXSpiller";
}

var temp = [thisElement.activePlayer,
thisElement.loadingPlayer];
thisElement.loadingPlayer=temp[0];
thisElement.activePlayer=temp[1];
thisElement.movieLoaded=true;

}

After the function is finished the classnames have been changed, but
the player do not change the visibility.

It works in IE and Firefox.

mvh
Tor
 
S

stannyc

Tor said:
thisElement.activePlayer.className = "usynligSpiller";
thisElement.loadingPlayer.className = "synligSpiller";
After the function is finished the classnames have been changed, but
the player do not change the visibility.
It works in IE and Firefox.

I don't have Opera here, so I can't try this out, but try changing
'class', as well as 'className'.

Stan Scott
New York City
 
T

torbs

Hi Stan

Thank, but I had already done it. Changing 'class' was the only way to
make opera change the class. It didnt understand changing of the
'classname' property. As it turns out this problem is also a case with
safari on mac. I have corrected the problem by creating some browser
specific code, but I had to use browser detection rather than feature
detection because both browsers claim to support visibility change of
embedded objects. Browser detection is not a good thing...

Agian thanks for the reply.

mvh
Tor
 

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,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top