Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes.

Context Menu's can be used to provide the help or displaying additional information to the user. You can easily create a simple context menu using JavaScript and plain old HTML. Check out the code:

And here is the complete code:

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" >

<head runat="server">














<title>Untitled Page</title>



<form id="form1" runat="server">


<a href="#" onmouseover="ShowHelpMenu(event)" onmouseout="HideHelpMenu()">Todays Task</a>

<div id="MyDiv" class="DivStyle">

<iframe src="Help.htm" frameborder="0" scrolling="no">







<script language="javascript" type="text/javascript">

function ShowHelpMenu(e)


document.getElementById("MyDiv").style.left = e.clientX;

document.getElementById("MyDiv") = e.clientY;

document.getElementById("MyDiv").style.visibility = "visible";


function HideHelpMenu()


document.getElementById("MyDiv").style.visibility = "hidden";




Posted on Sunday, August 20, 2006 5:44 PM | Back to top

Comments on this post: Creating a Simple Context Menu

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Mohammad Azam | Powered by: