CreatePopupMenu Method
The CreatePopupMenu method creates an object that contains a popup menu.
Syntax
[obj=] SiteCafe.UserInterface.CreatePopupMenu()
|
Return Value
Returns a SKMenu object that represents the new popup menu.
Remarks
A popup menu can be used as a submenu of a normal menu.
Examples
The following example creates a HTML dialog containing a menu with submenus.
<SCRIPT TYPE="text/javascript">
window.external.InitScriptInterface();
function onCommand(ai_Code, ai_CommandID, al_Handle)
{
switch (ai_CommandID)
{
case 1: alert('Hello'); break;
case 3: alert('Bye'); break;
}
}
mySubMenu = SiteCafe.UserInterface.CreatePopupMenu();
mySubMenu.InsertString(3,1, "Say Hello", "");
mySubMenu.InsertString(4,3, "Say Bye", "");
myMenu = SiteCafe.UserInterface.CreateMenu();
myMenu.InsertSubmenu(2,4, mySubMenu.Handle, "MessageBox", "");
myMenu.InsertString(5,2, "Exit", "");
mydialog = SiteCafe.UserInterface.CreateHTMLDialog();
mydialog.URL = "http://www.myURL.com";
mydialog.Title = true;
mydialog.Menu = myMenu.Handle;
mydialog.OnCommand = onCommand;
mydialog.ShowDialog();
</SCRIPT>
|
Applies to
SiteKiosk v6.2 (and later versions).
Back to top