Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <script type="text/javascript" src="dojo/dojo.js" djConfig="parseOnLoad:true, isDebug:true"></script>
- <style type="text/css">
- @import "dojo/resources/dojo.css";
- @import "dijit/themes/tundra/tundra.css";
- </style>
- <script type="text/javascript">
- dojo.require("dojo.parser");
- dojo.require("dijit.form.Form");
- dojo.require("dijit.form.FilteringSelect");
- dojo.require("dijit.form.ValidationTextBox");
- dojo.require("dojo.data.ItemFileReadStore");
- dojo.require("dijit.form.Button");
- </script>
- </head>
- <body class="tundra">
- <div dojoType="dijit.form.Form" id="form" jsId="form" name="form" validate(); encType="multipart/form-data" action="" method="">
- <table>
- <tr>
- <td>
- <label>*Поле1:</label>
- </td>
- <td>
- <input dojoType="dijit.form.FilteringSelect" searchAttr="name" id="selectField" required="true">
- </td>
- </tr>
- <tr>
- <td>
- <label>*Поле2:</label>
- </td>
- <td>
- <input dojoType="dijit.form.ValidationTextBox" type="text" id="textField" name="textField" minLength="1" trim="true" required="true" style="width: 10em;"/>
- </td>
- </tr>
- <tr>
- <td colspan="2" align="center">
- <button dojoType="dijit.form.Button" type="button" id="buttonSave" style="margin-right:5px;" disabled>Сохранить</button>
- <button dojoType="dijit.form.Button" type="reset">Очистить</button>
- </td>
- </tr>
- </table>
- </div>
- </body>
- <script type="text/javascript">
- dojo.addOnLoad(function(){
- dojo.connect(dijit.byId("form"), "onValidStateChange",function(isValid) {
- dijit.byId("buttonSave").set("disabled",!isValid);
- });
- var store = new dojo.data.ItemFileReadStore({data: {items: [{"id":"1","name":"как не крути"},{"id":"2","name":"заполняется"}], identifier:"id", label:"name"}});
- dijit.byId("selectField").set("store", store);
- });
- </script>
- </html>
Add Comment
Please, Sign In to add comment