Welcome to WebmasterWorld Guest from 54.224.50.28

Forum Moderators: travelin cat

Message Too Old, No Replies

document.getElementById.style.backgroundColor on IE5 for MAC

     

clarissa1996

6:48 am on Oct 5, 2004 (gmt 0)

Inactive Member
Account Expired

 
 


Hi all,

the following javascript does not works with "IE5 for MAC".

If you want to try the program, here is the link:

<snip>

On "IE5 for MAC" after selecting a checkbox and pressing the button "INIZIA" the table disappears.

Probably the problem is in the following line:

document.getElementById(id).style.backgroundColor = '#c0c0c0';

If you look in the code you will find this line in the function initGame().

On all other browser works OK!

Note: this is for a free program that I am writing for a primary school. I do not work on MAC and therefore it is for me very hard to find the problem.
Any help is appreciated.

Thanks.

Clarissa

[edited by: Macguru at 1:31 pm (utc) on Oct. 6, 2004]
[edit reason] Per TOS, no links to own please. [/edit]

dcrombie

1:59 pm on Oct 5, 2004 (gmt 0)

Inactive Member
Account Expired

 
 


Your code looks ok to me. I use something like the following which AFAIK works in all common browsers:


var el = document.getElementById(id);
if(el.currentStyle) {
// for msie
el.style.backgroundColor = "#c0c0c0";
} else {
// for real browsers ;)
el.style.setProperty("background-color", "#c0c0c0");
}
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members