943,640 Members | Top Members by Rank

Ad:
Oct 28th, 2005
0

Javascript not working in Firefox

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Kayoss is offline Offline
1 posts
since Oct 2005
Oct 31st, 2005
0

Re: Javascript not working in Firefox

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.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Nov 6th, 2005
0

Re: Javascript not working in Firefox

Disabling right click is done using a single statement.

<body oncontextmenu="return false;">

This works for both the mouse and the keyboard in all modern browsers except Opera (which doesn't allow you to block right click).
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
felgall is offline Offline
50 posts
since Aug 2004
May 13th, 2009
0

Re: Javascript not working in Firefox

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]
Last edited by Ezzaral; May 13th, 2009 at 1:31 pm. Reason: Snipped url. Please do not post "fake" sig links in a message. You can create a user signature in the control panel.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ryansmith is offline Offline
5 posts
since Apr 2009
May 17th, 2009
0

Re: Javascript not working in Firefox

HI,
You can try with my below post. Hope it will help you.
http://shawpnendu.blogspot.com/2009/...lickimage.html
Reputation Points: 26
Solved Threads: 44
Posting Whiz in Training
mail2saion is offline Offline
247 posts
since Apr 2009
Apr 26th, 2010
0
Re: Javascript not working in Firefox
Some JavaScript Functions Are not Working in FireFox Browser.
I want to Know what is the reason why it is not working ?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
malavaraja is offline Offline
1 posts
since Apr 2010
Apr 26th, 2010
0
Re: Javascript not working in Firefox
Click to Expand / Collapse  Quote originally posted by malavaraja ...
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
Reputation Points: 40
Solved Threads: 74
Posting Pro
fxm is offline Offline
591 posts
since Apr 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: json_parse
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: JavaScript: Put all opening HTML tags in array





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC