954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Javascript not working in Firefox

Hello all! I have a javascript running on my site at http://www.kayoss.net that disables right clicking (viewing source, saving pictures, etc.) that works beautifully in IE...but not in Firefox. Does anyone know of a solution?

Kayoss
Newbie Poster
1 post since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

1st, the script calls for an argument to be passed in, it appears to be the Event object, yet your call doesn't pass anything in.

Also, the script definition should properly be inside the head section. Lastly, it's a bad idea, in my opinion, to attempt to alter or change the user model.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

Disabling right click is done using a single statement.

This works for both the mouse and the keyboard in all modern browsers except Opera (which doesn't allow you to block right click).

felgall
Junior Poster in Training
50 posts since Aug 2004
Reputation Points: 13
Solved Threads: 1
 

It is a known problem that that Javascript will behave different with various browsers. On of the way is to use javascript that is generally accepted by W3 standards. If some functions still do not work, try hiding the script from that browser to avoid any errors.

Thank you,
Ryan
[url snipped]

ryansmith
Newbie Poster
5 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

HI,
You can try with my below post. Hope it will help you.
http://shawpnendu.blogspot.com/2009/04/disable-right-mouse-clickimage.html

mail2saion
Posting Whiz in Training
247 posts since Apr 2009
Reputation Points: 26
Solved Threads: 44
 

Some JavaScript Functions Are not Working in FireFox Browser.
I want to Know what is the reason why it is not working ?

malavaraja
Newbie Poster
1 post since Apr 2010
Reputation Points: 10
Solved Threads: 0
 
Some JavaScript Functions Are not Working in FireFox Browser. I want to Know what is the reason why it is not working ?

One common reason is that the script is using a property which is not available in that browser.

For example: innerText vs. textContent.

fxm
Posting Pro
596 posts since Apr 2010
Reputation Points: 40
Solved Threads: 74
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You