Sets or retrieves whether the context menu is displayed when the right mouse button is clicked.
Syntax
HTML | <HTA:APPLICATION CONTEXTMENU
= sContextMenu... >
|
---|
Scripting | [ sContextMenu = ] HTA:APPLICATION.contextMenu |
---|
Possible Values
sContextMenu | String that specifies one of the following values. yes | Default. Context menus are displayed. | no | Context menus are not displayed. |
|
The property is read-only.
The property has a default value of
yes.
Remarks
Note The contextMenu property is read only, however the CONTEXTMENU attribute can be used to set the initial value.
Example
This example shows how to retrieve the contextMenu property.
<HTML>
<HEAD>
<HTA:APPLICATION
ID=oHTA
CONTEXTMENU="no"
/>
<TITLE>HTA Properties</TITLE>
<STYLE>
BODY {font-size: 8pt; font-family: Arial;}
</STYLE>
</HEAD>
<SCRIPT>
function readFun()
{
alert("The contextMenu property is set to: " + oHTA.contextMenu);
}
</SCRIPT>
<BODY>
<P>Read the property:
<INPUT TYPE="button" VALUE="Test contextMenu value" onClick="readFun()"/>
</P>
</BODY>
</HTML>
Standards Information
There is no public standard that applies to this property.
Applies To