<script>
function ShowContextMenu()
{
var x = event.screenX;
var y = event.screenY;
popupWindow = window.createPopup();
var popupBody = popupWindow.document.body;
var content = "";
content = "<div id='ContextMenu' style='border:1px solid blue'>";
content += "</div>";
popupBody.style.backgroundColor = "#cccccc";
popupBody.innerHTML = content;
CreateElement(popupWindow);
popupWindow.show(x,y,60,200);
event.returnValue = false;
}function CreateElement(popupWindow)
{
var obj = popupWindow.document.all.ContextMenu;
var btn = popupWindow.document.createElement('INPUT');
btn.type='button';
btn.value='click';
obj.appendChild(btn);
}</script><html>
<body oncontextMenu=ShowContextMenu()>
</body>
</html>
function ShowContextMenu()
{
var x = event.screenX;
var y = event.screenY;
popupWindow = window.createPopup();
var popupBody = popupWindow.document.body;
var content = "";
content = "<div id='ContextMenu' style='border:1px solid blue'>";
content += "</div>";
popupBody.style.backgroundColor = "#cccccc";
popupBody.innerHTML = content;
CreateElement(popupWindow);
popupWindow.show(x,y,60,200);
event.returnValue = false;
}function CreateElement(popupWindow)
{
var obj = popupWindow.document.all.ContextMenu;
var btn = popupWindow.document.createElement('INPUT');
btn.type='button';
btn.value='click';
obj.appendChild(btn);
}</script><html>
<body oncontextMenu=ShowContextMenu()>
</body>
</html>
<html>
<head><script language="JavaScript">
<!--
var popupWindow = null;
function ShowContextMenu()
{
var x = event.screenX;
var y = event.screenY;
popupWindow = window.createPopup();
var popupBody = popupWindow.document.body;
var content = "";
content = "<div id='ContextMenu' style='border:1px solid blue'>";
content += "</div>";
popupBody.style.backgroundColor = "#cccccc";
popupBody.innerHTML = content;
CreateElement(popupWindow);
popupWindow.show(x,y,60,200);
event.returnValue = false;
}function CreateElement(popupWindow)
{
alert(popupWindow.document.getElementById("ContextMenu"));
var obj = popupWindow.document.getElementById("ContextMenu");
var btn = popupWindow.document.createElement('INPUT');
btn.type='button';
btn.value='click';
obj.appendChild(btn);
}//-->
</script></head>
<body oncontextMenu=ShowContextMenu()>
</body>
</html>