471,336 Members | 1,254 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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

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

May 1 '06 #1
2 1474
Tor wrote:
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

May 1 '06 #2
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

May 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Csaba2000 | last post: by
13 posts views Thread by TheKeith | last post: by
2 posts views Thread by Tom Frantz | last post: by
4 posts views Thread by Alexandre Jaquet | last post: by
16 posts views Thread by Giggle Girl | last post: by
15 posts views Thread by Sunny | last post: by

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.