Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Iframe Right Click Menu

    I have tried to create a right-click menu on a webpage, but am unable to create a menu for an iframe. So far I have achieved the following:

    <html>
    <head>
    <title>New Page 1</title>
    </head>
    <script>
    document.oncontextmenu = rightmenu;
    function rightmenu(){
    var popupMenu = window.createPopup();
    var x = event.clientX;
    var y = event.clientY;
    var menu = popupMenu.document.body;
    menu.style.backgroundColor = "C0C0C0";
    menu.innerHTML = "Morning!";
    popupMenu.show(x, y, 100, 100, document.body);
    return false;
    }
    </script>
    <body>
    </body>
    </html>

    This allows the menu to appear on a normally webpage document. How would I make this appear in an iframe with the unqiue frame id of 'editor'.

    Any help with this would be most appreciated.

    Many Thanks,
    Ben Chivers

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts
    editor.document.oncontextmenu = rightmenu;


    ??????? ???
    Regards
    VKiDV


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •