Attach to form

</> Source
<!DOCTYPE html>
	<title>Attach to form</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>
		var myPop;
		var myForm;
		function doOnLoad() {
			myForm = new dhtmlXForm("myForm", [
				{type: "settings", position: "label-left", labelWidth: 120, inputWidth: 130},
				{type: "input", name: "name", label: "Full Name / Nick", value: "Ogiwara Masaaki"},
				{type: "password", name: "pwd", label: "Password", value: "12345"},
				{type: "button", name: "proceed", value: "Proceed"}
			myPop = new dhtmlXPopup({ form: myForm, id: ["name","pwd"]});
			myPop.attachHTML("Please enter something<br>Second line<br>One more line here");
			myForm.attachEvent("onFocus", function(id,value){
				if (typeof(value) != "undefined") id=[id,value]; // for radiobutton;
			myForm.attachEvent("onBlur", function(id,value){
<body onload="doOnLoad()">
	<div id="myForm"></div>


Check documentation to learn how to use the components and easily implement them in your applications.