Java Script no executing on MAC platform

Hello All:
I am trying to use a Java Script on my personal website to block use of the right mouse button so images can not be saved from my website. I found a script that works great on the PC (IE8) but when some of friends on the MAC platform give me feed back the script does not seem to be executing properly (my page and images are wide open). So my question is: is there a solution to this problem and how do I fix it?
Here is the script (I am not the author) and it is placed in the <head> on each page. Also, here is a link to my website and the test pages where the script is working on the IE platform: http://twolabphotography.com/Galleries/Wyoming%20Web%20Gallery/index.html
<script type="text/javascript">
document.onmousedown=disable; //IE
message="Sorry no rightclick on this page.\nNow you cannot view my source\nand you cannot steal my images";
function disable(e)
if (e == null)
  { //IE disable
  e = window.event;
  if (e.button==2)
    alert(message);
    return false;
document.onclick=ffdisable;  //FF
function ffdisable(e)
if (e.button==2)
  { //firefox disable
  e.preventDefault();
  e.stopPropagation();
  alert(message);
  return false;
</script>
Any help or suggestions would be appreciated. OBTW, java scripting is a bit over my head and this is the first time I have been attempted to use it on my website.
John Munro
[email protected]

I am trying to use a Java Script on my personal website to block use of the right mouse button so images can not be saved from my website.
John:
This is so 90's.  It's an impossible feat - just accept the fact that you CANNOT prevent this and do something useful instead.  If someone wants your images, they will get them in any of a variety of ways, the simplest being just disabling javascript in the browser.
What do you do about those left-handed people who have their buttons reversed?
What do you do about those who take a screen capture of your image?
If you don't want your images taken, don't put them on the web.

Similar Messages

  • Can java script be executed inside Acrobat reader 7

    Hello All
    I am quire new to Acrobat. Please tell me if I can execute a java script in Acrobat reader.
    I am using itext library to add java script to a pdf and opening the pdf in reader and get the error
    NotAllowedError: Security settings prevent access to this property or method.
    Global.addWatermarkFromText:1:Document-Level:0000000000000000
    First question can I execute this javascript with Reader itself. If yes how should i get rid of this error

    The Acrobat SDK cannot be used to change the information shown for
    each method in the quick bar in the documentation. If that says the
    method does not work in Reader, then it does not work in Reader...
    I do not think there is any similar method for Reader (adding a
    watermark) - very much an Acrobat function. Unless you can pre-create
    the watermark as a form field, so you only have to change the text at
    runtime.
    Aandi Inston

  • Java Scripting help

    Hello. I am new to java, as well as still somewhat a newbie on mac. I was wondering if there is a free program out there, or on my mac, that would allow me to write java and then check it for errors? Preferably something for slower peeps like me. Also if there is a general javascript library with the basic scripts most commonly used so I can get a better idea of how to write the script? Thanks in advance!

    Hi,
    Go here: Introduction to Apple JavaScript Coding Guidelines
    Java Script Basics
    New to Mac? Getting Started on a Mac
    Switching from Windows? Switch 101
    Carolyn

  • Java - help to write scripts after moving to mac os x from windows

    hey, ive recently converted to using a mac. I study java as part of my uni course, and need to write java scripts. Is there a java script editor pre-installed on mac os x? Ive downloaded jEdit aswell to write scripts, so thats not essential, but my major problem is how do i compile the scripts? In windows theres dos, whats the equilavent on mac? If someone could give me a quick run through of how i would compile a script and run it that would be awesome. As on windows i found the directory, used javac <script>.java to compile, then java <script> to run. Is this the same on mac. Also a few hints on how to use the mac command window (if there is one) would be awesome, e.g. how to call a directory, dir on windowns etc, then how to change directory, e.g. cd c:\ on windows. Any help on this would be much appreciated, thanks, andy.
    macbook pro   Mac OS X (10.4.8)  

    Hello drew__r,
    Welcome to the Apple Discussions, and congratulations on making a choice which I hope you will never regret. (I have to use both platforms; but for personal choice it's a no-brainer!)
    I'm not a programmer. But most of the things that in Windows are done via DOS are done in the Mac via Terminal, which uses Unix, and is far more idiot proof than the Windows equivalent. I should know: even I've used it!
    You might get a reply in this forum, for I know that several serious Unix experts are regular contributors in this particular forum. However, if you don't get a reply in a day or two, you might consider posting in the Mac OSX Technologies Forums. (Multiple postings of a question should normally be avoided, and can get the user into trouble with the moderators. So say "Sorry for reposting here, but . . . ") Those technology forums also give you access to Applescript experts; and that is a brilliant and quite powerful "plain language" way of writing scripts for OSX. I don't know if it would work for your request.
    Best of luck,
    Martin
    If you found that this contribution helped to answer your question, please consider the "Helpful" and "Solved" buttons in this message. Why reward points?
    Powerbook 15-inch G4 1GHz   Mac OS X (10.4.8)   Several veterans that go on and on. 40gig, 3rd generation iPod

  • Making a java browser component for Mac platform(Urgent)

    I was trying to make a simple java browser component from scratch for running on Mac platform. I was using JFrame/JEditorPane. Although JEditorPane can open web pages but it can't support Javascript, flash and other interactive features of many websites. Does anyone know any way to make JEditorPane support javascript?
    I also researched on JDIC java web browser, but unfortunately they don't support for Mac yet. Is there any free third party tool available which I can use?
    Any quick help is appreciated. Thanks.

    I was trying to make a simple java browser component from scratch for running on Mac platform. I was using JFrame/JEditorPane. Although JEditorPane can open web pages but it can't support Javascript, flash and other interactive features of many websites. Does anyone know any way to make JEditorPane support javascript?
    I also researched on JDIC java web browser, but unfortunately they don't support for Mac yet. Is there any free third party tool available which I can use?
    Any quick help is appreciated. Thanks.

  • Button executing CloseWindow Java Script and raising event on server

    Hi All.
    Somebody can help me with this:
    <b>What i'm needing:</b> an 'END' button on a BSP, when the user click on this button just show an aswer box asking if the user wants to close the windows, in case to click yes close the current window and execute a business logic in the controller.
    <b>What i have:</b> a button with the event onClientClick invoking a Java Script function which is showing the answer box and the event onClick which raise the event on the server side. The thing is if the user click on yes then i'm closing the current window and the server event never is triggered. This is not working !!!
    Any ideas ? some sample code ?
    Thanks in advance.
    Armando.

    Hi Armando,
    The 'Yes' on the <i>Confirm dialog box</i> (Client Side Scripting) has to tell the application (Server side scripting) to call your METHOD XXX. This is done by passing querystring <i>exit=X</i> to the URL.
    1. Comment onClick event of the button.
    2. Modify the code the JS function of your End button as follows
       func_end()
    //if no
      // your original code
    // if yes
    document.location.href = document.location.href + '?exit=X';
    3. Add following code to DO_REQUEST
      IF REQUEST->GET_FORM_FIELD( NAME = 'exit' )  ne space.
    *your method will be called only when there is an exit=x in the url
           call method XXX.
    *set a page attrib as follows
           l_exit = 'X'.
      ENDIF.
    4. Add following code to your layout
    <%if l_exit = 'X'.%>
    <script>
    window.close();
    </script>
    <%endif.%>      
    Regards,
    Alwyn

  • How to call Java script from java code?Can Jscript be executed at server?

    Hi All,
    We are using 'WebTrends' tool to analyze our site usage pattern.
    To use WebTrends, we need to :
    1) call Java Script code from the java code
    2)Java script has to be executed at server.
    Please comment on two points mentioned above. If yes, please let me know how to do them?
    Thanks in advnce,
    Regards,
    Ganga

    You can check out Rhino project.
    [http://www.mozilla.org/rhino/]

  • Executing Java script while dragging a component

    Hi,
    Is there a way to execute Java script while dragging a component, I have noticed only following events mouseMove, mouseOut, mouseDown mouseUp for clientListener tag. could not find anything related to dragging event.
    My scenario is, I have componentDragSource to a component and I want fire a java script event on drag of that component.
    Please suggest. TIA.
    Thanks,
    Siva G.

    Hi Frank,
    Thanks for your response.
    Could you please give me some sample on that like what type of event and on which component I have to set clientListener.
    Thanks,
    Siva G.

  • I'm trying to download Firefox 4 onto Windows 7 platform. I keep getting an error message that says Java script has an error in Chrome ? Unable to complete download. Constant ahngs & freezes

    I am running on Windows 7 platform. I tired to download the latest Firefox 4 release. Each time, I get the message that "there is an error on line 20 in Java script Chrome that is preventing the download from continuing. I've run Fox in safe mode & still get the same message.

    Your More system details list shows that you use Firefox 4:
    *Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
    Are you trying to (re)install Firefox 4 or do you get that error if you start Firefox?
    Do a clean (re-)install:
    * Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 4.0: http://www.mozilla.com/firefox/all.html
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Don't remove personal data if you uninstall the current version.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere (not in the Firefox program folder) and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    If that still doesn't work then create a new profile as well.
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Early 2008 mac pro 8 core quicktime videos opening in java script code

    When I try to view a quicktime video it opens in Java Script Code instead of playing the video on my early 2008 Dual Quad Core 2.8 Ghz. Mac Pro running OSX 10.5.8 

    That's not much to go on, but I doubt it has anything to do with it being a Mac Pro. Select the clip and Get Info (Cmd I) to see what application is named in the "Open with" drop down menu. If it is anything other than QuickTime player, change it and try again.  Also, repair your permissions...

  • Execute java script in action listener before action

    Hi, I have af:commandButton on my page , in its actionListener method I call java script
    which displays af:popup with two buttons, I want to execute af:commandButton's action method with some program logic in depend of which button in the af:popup is clicked. The problem is that action method is execute before my java script to show the af:popup.

    Hi,
    the reason is that the JavaScript that you execute from the ActionListener is not executed before the page (or page section) is rendered, which is in the lifecycle is then after the action method is invoked.
    However, I am observing on this forum that users think of JavaScript as a silver bullet, whereas it should really be seen as second choice only. If you want to execute logic in respect to which button a user clicks, then the code should be assigned to the button and not handled by some JavaScript. If - in combination with popups - you need to use JavaScript, then have a look at using the client listener for this (af:clientListener). Idealy you use the server side af:showPopupBehavior.
    As a rule of thumb: always try to go with best practices and not with the easy catch
    Frank

  • Get system variable and execute a Java Script

    I'm not sure it is the appropriate forum to ask this
    question. I'm using Captivate 2 without LMS.
    I need to execute a java script that take read a system
    variable (eg. USERNAME) and opens an URL using the USERNAMe as
    parameter. The idea here is to update a database opening a specific
    URL for a specific USERNAME.
    Any one has an example to do something similar ?

    Hello All,
    Could anyone please help me with some examples or
    tutorials how I can create Java Applet to run telnet
    to UNIX and execute a shell script?
    Presumably you don't need to write the telnet code yourself (like for a class.)
    If so then you can use this...
    http://jakarta.apache.org/commons/net/
    There might be some other dependencies from other commons stuff that you will need to resolve to run it.
    Once you have that, presumably you are not telnetting back to the source of the applet. If so you will need to deal with security for the applet. Usually that means that you must sign the applet. Otherwise you will have to modify the policy file on each client machine that will run the applet.

  • ID CS5 on Mac 10.5.8 can't run java scripts from User folder

    I seem to have a problem with my java scripts in ID on my Mac. I store them in my user scripts folder, but while I can run any applescripts in the folder, doubleclicking on any of the java scripts gets me exactly nothing. If I open the scripts in Extend Script Toolkit and run them from there, they will work, but I can't run them from within ID. The scripts in the Sample Script folder work. I've tried changing the script extentions, I've opened them in the toolkit and resaved them. Still no response at all when I doubleclick on them in the scripts panel. Any idea what could be wrong? I can run the same scripts from within ID on my Windows laptop, so I don't think the scripts themselves are at fault. In fact, I just moved them into the Sample scripts folder, and they run with no problem. Does the User script folder just not work?

    Not sure what a screenshot will tell you, but here you go.
    Well, I was hoping that the icon next to the scripts would be instructive.
    Apparently not, though!
    You said the same scripts work fine if you move them into the Application Scripts folder, specifically the Sample Scripts folder. I assume, then, that the sample scripts also break if moved to the User Scripts folder?
    Is your User Scripts folder (and thus your home directory) on a non-local (network) filesystem? Are the permissions on it wacky? If you Reveal In Finder it, and Get Info, do you see anything out of the ordinary?
    What if you delete it (err, move it aside) and recreate it?
    This seems pretty strange...

  • I am getting Java Script errors for InDesign only in CS3 on my Mac OSX 10.9.1

    When I try to open InDesign (CS3) on my Mac OSX 10.9.1 I get Java Script Error
    Error Number 45
    Error String Object is Invalid
    Line 387
    later
    Line 428
    I tried checking the prompt line & I get this message
    "CGSFlushWindow" is obsolete use "GGSFlushWindowContentRegion" instead
    I have NO clue what that means
    HELP!!!!!!!!

    It means what it says: The respective function no longer exists. Anyway, ask in the ID forum. I'm sure someone there can help you fix whatever script is running amok.
    Mylenium

  • Re: Executing Planning Sequence using java script.

    Hi All,
    Can anyone tell me how to execute a planning sequence using a java script.
    Regards.
    Shafi.

    Hi Deepti,
    i have written a java script which will display the error message from IP in a Pop up window.
    For this to work the java script function needs to be called once the planning sequence is done with execution.
    I didn't find ways to do it based on the WAD commands.
    hence i thought i can run the planning sequence in the same java script that i have written.
    Can you help me based on the inpus ihave given ?
    Regards.
    Shafi.

Maybe you are looking for

  • JDBC Driver Class  error While Creating New Dataset for MS  SQL 2008?

    Hi Experts ,     I am getting an error in please Help Me ... Regards, Mayank Shah

  • Sql/Plsql code to export data into a temporary table from a text file

    Dear all, I need to create a temporary table getting data from a text file. I am very new to data loading could you please help me how to read the text file in to a temporary table. i have text file like as below: order items : books Purchasing start

  • Other columns with group by

    Hi, Using oracle 10g on windows: I want to get all the columns of scott.emp table group by deptno. Because if i gives : select * from emp group by detpno; then its gives me ORA-00979: not a GROUP BY expression In addition to this please tell me how d

  • "Send these cards..." only sends the first one

    I'm trying to send several cards at a time to a bluetooth mobile phone. In Address Book I use Cards, Send these cards... after I've highlighted, say, three cards in the address books. It only sends the first of the cards.

  • Crash when opening windows in extension...

    Hello everybody. I have encountered a strange issue when trying to open a window from within my extension on OSX: It seems that whenever i try to open a "spark" window from Photoshop CS6, it instantly crashes. The same extension works flawlessly in I