473,322 Members | 1,734 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,322 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 1541
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Csaba2000 | last post by:
How can I dynamically resize a button in Opera? The following code works for both IE 5.5 and NN 6.1, but Opera 7.01 is not budging. Any ideas? Thanks, Csaba Gabor from New York <!DOCTYPE...
13
by: TheKeith | last post by:
Is it just me or does opera and ie not render the float style properly? IE does a sucky job at it, but opera makes a total mess; Mozilla/Firefox renders it correctly however. I'm just trying to be...
2
by: Tom Frantz | last post by:
I have a table in IE 6.0 listing several items where clicking on a row will bring up another window showing details for that item. Clicking a particular button on the detail window will change how...
4
by: Alexandre Jaquet | last post by:
Hi, I would like to know how can I change a row background color when an user select a row thx
16
by: Giggle Girl | last post by:
Hi there, I have a nav tree similar to the XP Windows Explorer in behavior. It uses styles to underline a row on mouseover, and change the look of a row when clicked. Currently, it is working...
2
by: Arielle | last post by:
Okay I've been wracking my brain all morning trying to figure this one out. It seems like to me it -should- work so kudos for anyone who can tell me what I'm doing wrong. <html> <head> <style...
1
by: sueian | last post by:
can some1 help with this code. can i add in a function like on click. when user click one of the link. the color will change to static from mouse over color. the text need to highligted after click....
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.