Init from html
</> Source
<!DOCTYPE html>
<html>
<head>
<title>Init from html</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
<script src="../../../codebase/dhtmlx.js"></script>
<script>
var myMenu;
function initMenu() {
myMenu = new dhtmlXMenuObject("menuObj");
myMenu.setIconsPath("../common/imgs/");
myMenu.loadFromHTML("menuData", true);
document.getElementById("buttonHere").style.display = "none";
}
</script>
</head>
<body>
<div style="height: 30px;" id="buttonHere">
<input id="btn" type="button" value="init menu" onclick="initMenu();">
</div>
<div style="height: 250px;">
<div id="menuObj"></div>
</div>
<div id="menuData" style="display: none;">
<div id="file" text="File">
<div id="new" text="New" img="new.gif"></div>
<div id="file_sep_1" type="separator"></div>
<div id="open" text="Open" img="open.gif"></div>
<div id="save" text="Save" img="save.gif"></div>
<div id="saveAs" text="Save As..." imgdis="save_as_dis.gif" enabled="false"></div>
<div id="file_sep_2" type="separator"></div>
<div id="print" text="Print" img="print.gif"></div>
<div id="pageSetup" text="Page Setup" imgdis="page_setup_dis.gif" enabled="false"></div>
<div id="file_sep_3" type="separator"></div>
<div id="close" text="Close" img="close.gif"></div>
</div>
<div id="m2" text="Edit">
<div id="undo" text="Undo" img="undo.gif"></div>
<div id="redo" text="Redo" img="redo.gif"></div>
<div id="edit_sep_1" type="separator"></div>
<div id="selectAll" text="Select All" img="select_all.gif"></div>
<div id="edit_sep_2" type="separator"></div>
<div id="cut" text="Cut" img="cut.gif"></div>
<div id="cpoy" text="Copy" img="copy.gif"></div>
<div id="paste" text="Paste" img="paste.gif"></div>
</div>
<div id="m3" text="Help">
<div id="about" text="About..." img="about.gif"></div>
<div id="help" text="Help" img="help.gif"></div>
<div id="bugReporting" text="Bug Reporting" img="bug_reporting.gif"></div>
</div>
</div>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.