home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 August / INTERNET94.ISO / pc / software / windows / building / webmenu_studio / wmstud01.cab / _855B04EA054F4E8F8B73B53D129ED7B0 < prev    next >
Encoding:
Text File  |  2002-03-14  |  2.3 KB  |  94 lines

  1. <html>
  2. <head>
  3.     <title>COALESYS, Inc.</title>
  4.  
  5.     <style>
  6.         <%StyleSheet%>
  7.     </style>
  8.  
  9.     <script language="JavaScript" type="text/javascript">
  10.  
  11.     <%JavaScript%>
  12.     
  13.     // Function which shows the Context Menu by calling
  14.     // cswmShow and passing in coordinates.
  15.     function ShowContextMenu(e)
  16.     {
  17.         // Quick and Dirty IE NN 6.1 Detection
  18.         if(document.oncontextmenu)
  19.         {
  20.             // IE
  21.             if(document.all)
  22.                 cswmShow('File', '', 'above', event.x + document.body.scrollLeft, event.y + document.body.scrollTop, 1);
  23.             // NN 6.1
  24.             else
  25.                 cswmShow('File', '', 'above', e.pageX, e.pageY, 1);
  26.             return false;
  27.         }
  28.         // Quick and Dirty NN4 Detection
  29.         else if (document.layers)
  30.         {
  31.             if (e.which == 3)
  32.             {
  33.                 cswmShow('File', '', 'above', e.pageX, e.pageY, 1);
  34.                 return false;
  35.             }
  36.         }
  37.         // Quick and Dirty NN6.0 Detection
  38.         else if (document.getElementById)
  39.         {
  40.             if (e.which == 3)
  41.             {
  42.                 e.preventDefault();
  43.                 cswmShow('File', '', 'above', e.pageX, e.pageY, 1);
  44.                 return false;
  45.             }
  46.         }
  47.     }
  48.     
  49.     // capture event for context menu
  50.     // Quick and Dirty NN4 Detection
  51.     if(document.layers)
  52.     {
  53.         document.captureEvents(Event.MOUSEDOWN);
  54.         document.onmousedown=ShowContextMenu;
  55.     }
  56.     // Quick and Dirty IE Detection
  57.     else if(typeof document.oncontextmenu == "object")
  58.     {
  59.         document.oncontextmenu = ShowContextMenu;
  60.     }
  61.     // Quick and Dirty NN6 Detection
  62.     else if(!document.all && document.getElementById)
  63.     {
  64.         //  NN 6.1 requires different handling than 6.0
  65.         if(parseFloat(navigator.vendorSub)>=6.1)
  66.             document.oncontextmenu=ShowContextMenu;
  67.         else
  68.             document.onmouseup=ShowContextMenu;
  69.     }
  70.     </script>
  71.  
  72. </head>
  73.  
  74. <body onResize="<%OnResizeEvent%>" scroll="auto" link="red" alink="red" vlink="red" bgcolor="#ffffff" leftmargin=10 topmargin=10 marginheight=10 marginwidth=10>
  75.  
  76. <%WebMenu%>
  77.  
  78.     <table>
  79.         <tr>
  80.             <td>Right click on page.</td>
  81.         </tr>
  82.     </table>
  83.     <table height="90%">
  84.         <tr>
  85.             <td height="90%"></td>
  86.         </tr>
  87.         <tr>
  88.             <td align="center"><span style="color:#808080; font-size:13px">The Preview Window is loading it's HTML from the Netmenu.wmt file, which is why there is not a buttonbar and right-click ability is enabed.  To learn more about Live Preview templates, please see the documentation under "Using WebMenu Studio - Advanced Topics".</span></td>
  89.         </tr>
  90.     </table>
  91.  
  92. </body>
  93. </html>
  94.