EasyUI Forum
April 24, 2024, 10:55:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: the validate method about form on: March 13, 2018, 07:36:09 PM
You used a wrong 'name' attribute value(nodeName). Please change to another value.
Code:
<input class="easyui-validatebox" type="text" name="nodeName1"
       data-options="required:true,validType:['length[0,50]']" size="30"/>

Thank you very much. It is true that this is the cause of this problem.   Cheesy
2  General Category / EasyUI for jQuery / Re: the validate method about form on: March 13, 2018, 01:16:33 AM
How do you declare the 'tree_add_window' and the form. Please show an example or some code snippets to demonstrate your issue.

some code is below. The attachment contains the complete page code.

Thank you very much!

            //字典类型为字典数据,树形或列表数据窗口
            var sub_win = $('#sub_window').window({
                modal: true,
                closed: true,
                minimizable: false,
                maximizable: false,
                onClose: function () {

                }
            });

            //树形数据新增或编辑窗口
            var tree_add_window = $('#tree_add_window').window({
                modal: true,
                closed: true,
                minimizable: false,
                maximizable: false,
                onClose: function () {
                    $('#tree_add_form').form('clear');
                }
            });

<div id="tree_add_window" class="easyui-window" title="Add Info"
     style="width: 400px; height: auto;">
    <form id="tree_add_form" method="post">
        <table width="100%" cellpadding="0" cellspacing="1">
            <tr height="40">
                <td width="100" align="right">
                    <span id="nodeName"></span>:
                    <input type="hidden" name="nodeId"/>
                    <input type="hidden" name="nodePid"/>
                </td>
                <td colspan="3">
                    <input class="easyui-validatebox" type="text" name="nodeName"
                           data-options="required:true,validType:['length[0,50]']" size="30"/>
                </td>
            </tr>
            <tr height="40">
                <td width="100" align="right">
                    <span id="nodeValue"></span>:
                </td>
                <td colspan="3">
                    <input class="easyui-validatebox" type="text" name="nodeValue"
                           data-options="required:true" size="30"/>
                </td>
            </tr>
            <tr height="40" align="left">
                <td>
                    &nbsp;
                </td>
                <td colspan="3">
                    <a id="tree_submit_btn" href="javascript:void(0)"/>
                </td>
            </tr>
        </table>
    </form>
</div>

3  General Category / EasyUI for jQuery / the validate method about form on: March 12, 2018, 07:36:43 PM
When I use the validate method in a pop-up form window, it works.

$('#sub_form').form('validate')

<div id="sub_window" class="easyui-window" title="Add Info"
     style="width: 400px; height: auto;">
    <form id="sub_form" method="post">
    </form>
</div>

 But when I used the validate method in a multi-level pop-up window, it was wrong.





Sub_window was the first pop-up window, and tree_add_window was the second popup window.The form is in the second pop-up window.

the version of easyui is 1.5.1.

For help.
4  General Category / General Discussion / Problem about $.fn.validatebox.defaults.missingMessage on: February 08, 2017, 03:45:24 AM
the version of easyui is 1.5.1

I want to modify the default tip when validatebox's value is null.

below is the code
Code:
$(function() {
     $.fn.validatebox.defaults.missingMessage = 'This field can't be null';
     $.fn.combobox.defaults.missingMessage = '该输入项为必输项2222222';
});

the set of validatebox take no effect, but the set of combobox take effect. why?

Can someone help me to solve this problem?



5  General Category / General Discussion / Re: Questions about the combobox onselect event on: February 08, 2017, 03:02:59 AM
Please delay a little time to change its text.
Code:
$('#cc').combobox({
onSelect: function(row){
var target = this;
setTimeout(function(){
$(target).combobox('setText','Hello,World');
},0);
}
})

Good! It can solve the problem, but is this a bug of easyui ?
6  General Category / General Discussion / Questions about the combobox onselect event on: February 07, 2017, 11:44:58 PM
the verson of easyui is 1.5.1

when I use the 'setText' method in the onSelect event of combobox, the value would be reset by anorther default event after the onSelect event.
For example.

$('#mycombobox').combobox({
        ....
   onSelect:function(record){
      $(this).combobox('setText','Hello World');
   }
});

'Hello World' will be replace by default event  in source code.

line 163 in jquery.combobox.js.

      if (!remainText){
         $(target).combo('setText', ss.join(opts.separator));
      }

How can I fix this bug?

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!