This sample demonstrates how you can create your own client-side wrapper for calling <b>cswmShow()</b>. In this case, the wrapper enables right-click "Context Menu" ability in IE 5, NN4 & NN6. The menu used is the NetMenu WMS sample, which is explained in detail elsewhere.
<p>
By setting up the page to capture a right click event in the document, we are able to call our own client-side function called ShowContextMenu().
<p>
Inside ShowContextMenu() a call is made to <b>cswmShow()</b>, passing in the menu Group <b>ID</b> that we would like to show (in this case, "File"), the direction the menu will try to appear from the determinded coordinates (in this case, "above"), the X and Y coordinates of the mouse pointer discovered by examining the browser's event object and a flag which instructs <b>cswmShow()</b> to use absolute positioning instead of relative.
</td>
</tr>
<tr>
<td colspan=2>
<p><b>View the Code:</b></td>
</tr>
<tr>
<td width=10></td>
<td>
<p>
The code for this sample is available in the product installation directory:
<ul>
<li><b>netmenu.wms</b> - The WebMenu Studio project file.
<li><b>netmenu.wmt</b> - The Preview template used by the Studio's Live Preview window.
<li><b>default.htm (this file)</b> - Uses the WebMenu compiled output and discusses the sample.
<li><b>./includes/*</b> - The WebMenu output compiled from the studio application.
<li><b>./images/*</b> - The images used in this sample.