Welcome visitor
* Login
* Register
It is currently July 19th, 2019, 6:33 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  javascript not working on firefox
PostPosted: March 27th, 2009, 12:25 am 
User avatar

Posts: 71
hi there,

i have this code that works fine in IE and Opera, but is not working on mozilla firefox.

event.srcElement.style.backgroundColor = '00ff00';
also have tried
event.srcElement.style.backgroundColor = '#00ff00';
but doesnt work either


what am i doing wrong?


Top
 Profile  
 
  Re: javascript not working on firefox
PostPosted: March 27th, 2009, 12:28 am 

Posts: 96
I've had a similar problem before. I fixed using a more specific sentence
document.getElementById('name').style.backgroundColor = '#00ff00';

Just send the name of the object to the function if you are going to use this function for many objects.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron