View Full Version : Iframe Right Click Menu

01-18-2003, 07:19 PM
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:

<title>New Page 1</title>
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;

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

01-19-2003, 06:02 PM
editor.document.oncontextmenu = rightmenu;

??????? ???