473,320 Members | 1,695 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,320 software developers and data experts.

probably beaten to death-disabling context menu

Been searching around and seems that most people say it's impossible
because people can steal your code or images a million different ways
but here's what I want to do:
I'm trying to make a javascript slideshow. I want the left click to
next slide but the right-click to go to the previous slide.
My code works. It does what I want. But every time I right click on
the div in addition to going to previous slide it also opens up the
context menu.
I am not trying to prevent people from stealing code or anything. Just
don't want them to have to be able to easily change slides without
navigating around or messing with the keyboard.
Does anyone know of a way?

Feb 17 '07 #1
3 1351
andrew wrote:
Been searching around and seems that most people say it's impossible
because people can steal your code or images a million different ways
but here's what I want to do:
I'm trying to make a javascript slideshow. I want the left click to
next slide but the right-click to go to the previous slide.
My code works. It does what I want. But every time I right click on
the div in addition to going to previous slide it also opens up the
context menu.
I am not trying to prevent people from stealing code or anything. Just
don't want them to have to be able to easily change slides without
navigating around or messing with the keyboard.
Does anyone know of a way?
The code I use does the following:

if( event.preventDefault )
{
event.preventDefault();
}

event.returnValue = false;

return true;

Which stops the context menu from being displayed an IE and Mozilla.

--
Ian Collins.
Feb 17 '07 #2
On Feb 16, 6:45 pm, Ian Collins <ian-n...@hotmail.comwrote:
... stops the context menu from being displayed an IE and Mozilla.
Unless, of course, the user unchecked the box in Preferences Content
Advanced (Javascript) Disable or Change Context Menus.
--i

Feb 17 '07 #3
Isaac Schlueter wrote:
On Feb 16, 6:45 pm, Ian Collins <ian-n...@hotmail.comwrote:
>>... stops the context menu from being displayed an IE and Mozilla.


Unless, of course, the user unchecked the box in Preferences Content
>>Advanced (Javascript) Disable or Change Context Menus.

Or even Preferences Content Enable JavaScript....

--
Ian Collins.
Feb 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

47
by: Daniel Silva | last post by:
Shriram Krishnamurthi has just announced the following elsewhere; it might be of interest to c.l.s, c.l.f, and c.l.p: http://list.cs.brown.edu/pipermail/plt-scheme/2005-April/008382.html The...
0
by: Rick | last post by:
I am a novice to embedded XP. I have an application that makes a call to the ManagementClass to get the MAC address. This code runs fine on XP professional and XP home, but when I copy the...
1
by: =?Utf-8?B?RGpub3J0aHl5?= | last post by:
Hey guys, i am having a problem with my pc. It is running XP Home and is an advent. Sometimes it does it when it starts up or some times jsut randomly. Here is the error code: 0x0000003...
102
by: BoogieWithStu22 | last post by:
I am running into a problem with a web page I have created when viewing it in IE6 on some machines. The page has a database lookup. The user enters an account name or number and clicks a lookup...
1
by: James | last post by:
Database was no responding when user did some query operation. I checked db2diag.log and found EDU error mentioned in it. I pasted them below. I am not sure how to sovle it. Any advice? Thanks in...
1
by: ashore | last post by:
Under Win32/Vista, PHP 5, I have a batch of files to convert and I'm trying to script that in PHP. The following fails silently - while the hand-entered version - sans the escapes of course -...
1
by: Nicolas | last post by:
Hello, On a Windows platform (XP SP2), using Wampserver 2.0, each time I try to access a distant file with PHP: $contents =...
0
by: eddy82 | last post by:
Hi guys.I need some advice as i my db2 instance was kill off suddenly at late night and not sure what has kill it. 2008-10-14-22.47.53.326765+480 E31715373A878 LEVEL: Severe PID : 856268...
6
by: Rocketmagnet | last post by:
Hi all, I have been kind of forced (honestly) into writing a class structure which contains a Diamond of Death, and I'm not entirely sure what to do about it. This is a simplified version of my...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.