GetChecked Method



 
The GetChecked method determines whether an item is checked.


Syntax

    [bool=] SKMenu.GetChecked(commandID)
Parameters
    commandID UINT value that contains the command ID of the item.
Return Value
    Returns a Boolean value that indicates if the item is checked.
Remarks
    None.
Examples
    The following example creates a HTML dialog containing a menu with submenus, an item can be checked and unchecked.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    function onCommand(ai_Code, ai_CommandID, al_Handle)
    {
       switch (ai_CommandID)
       {
          case 1:
            alert(mySubMenu.GetChecked(1));
            break;
          case 3:
            mySubMenu.SetChecked(1, !mySubMenu.GetChecked(1));
            break;
       }
    }
    mySubMenu = SiteKiosk.SiteKioskUI.CreatePopupMenu();
    mySubMenu.InsertString(3,1, "Say if ckecked", "");
    mySubMenu.InsertString(4,3, "Check/Uncheck previous item", "");
    myMenu = SiteKiosk.SiteKioskUI.CreateMenu();
    myMenu.InsertSubmenu(2,4, mySubMenu.Handle, "Menu", "");
    myMenu.InsertString(5,2, "Exit", "");
    mydialog = SiteKiosk.SiteKioskUI.CreateHTMLDialog();
    mydialog.URL = "http://www.myURL.com";
    mydialog.Title = true;
    mydialog.Menu = myMenu.Handle;
    mydialog.OnCommand = onCommand;
    mydialog.ShowDialog();
    </SCRIPT>
    

Applies to
    SiteKiosk v5.5 (and later versions).

Back to top