Welcome and have a nice stay !       login   register   need help?  

 Page Info

Page Title: Custom Browser Context Menu
Description: A customizable right-click menu for browsers
Author: Blizzard
Submission Date: 06-09-2005 04:42

 Rating & Comments

View or add comments: (0)
Average members rating: 0



Code :
// hide source code
// hide line numbers

 1  <html>
 2  <SCRIPT language=javascript type=text/javascript>
 3  //code by Blizzard
 4  var js=window.createPopup
 5  
 6  if (js)
 7  document.oncontextmenu=init;
 8  var item="";
 9  var item2="";
10  function init(){
11  mx=event.clientX;
12  my=event.clientY;
13  menx=window.screenLeft+mx;
14  meny=window.screenTop+my;
15  sysmen=window.createPopup();
16  sysmen.document.write(item);
17  sysmen.show(menx,meny,item_width,document.getElementById('bord').offsetHeight);
18  return false
19  };
20  function item_init(){
21  if (js){
22  item+=("<style type='text/css'>.textul{position:absolute;top:0px;color:"+item_titletext+";writing-mode:    tb-rl;padding-top:10px;filter: flipH() flipV() dropShadow( Color=000000,offX=-2,offY=-2,positive=true);z-Index:10;width:100%;height:100%;font: bold 12px sans-serif}.gradientul{position:relative;top:0px;left:0px;width:100%;background-color:"+item_titlecol2+";height:100%;z-Index:9;FILTER: alpha( style=1,opacity=0,finishOpacity=100,startX=100,finishX=100,startY=0,finishY=100)}.contra{background-color:"+item_titlecol1+";border:1px inset "+item_bg+";height:98%;width:18px;z-Index:8;top:0px;left:0px;margin:2px;position:absolute;}.bord{position:absolute;top:0px;left:0px;padding-left:18px;background-color:"+item_bg+";border:2px outset "+item_bg+";z-Index:1;}.bord a{margin:1px;cursor:default;padding-bottom:4px;padding-left:1px;padding-right:1px;padding-top:3px;text-decoration:none;height:100%;width:100%;color:"+item_cl+";font:normal 12px sans-serif;}.bord a:hover{background:"+item_bgov+";color:"+item_clov+";} BODY{overflow:hidden;border:0px;padding:0px;margin:0px;}.ico{border:none;float:left;}</style><div class='bord'>")
23  }
24  };
25  
26  function item_item(txt,ico,lnk){
27  item2+=("<a href='#' onmousedown='parent.window.location.href=""+lnk+""'><img src='"+ico+"' width='16' height='16' class='ico'> "+txt+"</a>")
28  };
29  
30  function item_close(){
31  if (js){
32  item+=item2;
33  item+=("</div><div class='contra'><div class='gradientul'></div><div class='textul' id='titlu'>"+item_title+"</div></div>");
34  document.write("<div id='bord' style='width:"+item_width+"'></div>");
35  document.getElementById('bord').innerHTML=item2
36  }
37  }
38  </SCRIPT>
39  
40  <style>
41  <!--
42  #bord {
43  BORDER-RIGHT: 2px outset; BORDER-TOP: 2px outset; Z-INDEX: 1; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: 2px outset; BORDER-BOTTOM: 2px outset; POSITION: absolute; TOP: 0px
44  }
45  #bord A {
46  PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 4px; MARGIN: 1px 1px 1px 16px; FONT: 12px sans-serif; WIDTH: 100%; PADDING-TOP: 3px; HEIGHT: 100%; TEXT-DECORATION: none
47  }
48  .ico {
49  BORDER-RIGHT: medium none; BORDER-TOP: medium none; FLOAT: left; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none
50  }
51  //-->
52  </style>
53  
54  <head>
55  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
56  <title>Custom Context Menu</title>
57  </head>
58  
59  <body>
60  <SCRIPT type=text/javascript>
61  item_title="MENU TITLE"
62  item_titlecol1="white"
63  item_titlecol2="blue"
64  item_titletext="white"
65  item_bg="#C0C6D0"
66  item_bgov="#006699"
67  item_cl="black"
68  item_clov="white"
69  item_width=160
70  item_init()
71  //use 'null' for NO ICON
72  item_item('Page1',null,'page1.htm')
73  item_item('Page2',null,'page2.htm')
74  item_item('Page3',null,'page3.htm')
75  item_item('Page4',null,'page4.htm')
76  item_item('Page5',null,'page5.htm')
77  item_close()
78  </SCRIPT>
79  
80  </body>
81  
82  </html>


Donation:

If you like our free quality work, make a donation by using Paypal and tell us what you would like to see improved on our site for the next few months.

Comments


No comments yet

 Site Activity
Currently online: 0 member(s), 41 guest(s) : All members offline.


 Quick Menu
sitemap
search
galleries
main
forums


 Our Services

Main Projects
Designers For Hire
Unique LDU Skins
LDU Skins For Sale
Seditio Skins For Sale
Templates For Sale


 Statistics
18582 registered members,
1870 topics in forums,
21584 posts in forums,
13589657 pages served since 2004-05-09.
more


 7th Version Design

+++
top