Skip to main content

How To Create Contextmenu in using Javascript (Only for IE)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContextMenu.aspx.cs" Inherits="ContextMenu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
  <title>Untitled Page</title>

  <script type="text/javascript">

function contextMenuClick()
var objContextMenu=document.getElementById("contextMenu");;;"visible";

<body oncontextmenu="contextMenuClick(); return false;">
  <form id="form1" runat="server">
          Click Here
      <div id="contextMenu" style="position: absolute; z-index: 999; visibility: hidden;
          border: 3px solid #000080; background-color: #red; color: #ee00ee">
          <a href="AllColors.aspx">My excellent context menu</a><br />
          <a href="ajax.htm">Ajax</a>


Popular posts from this blog