...

View Full Version : Iframe Right Click Menu



bench
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:

<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

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


??????? ???



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum