EasyUI Forum
November 28, 2025, 12:29:40 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: How to hid textBox and combobox on: December 07, 2014, 07:53:56 PM
You can extend the 'show' and 'hide' methods easily.
Code:
$.extend($.fn.textbox.methods, {
show: function(jq){
return jq.each(function(){
$(this).next().show();
})
},
hide: function(jq){
return jq.each(function(){
$(this).next().hide();
})
}
})

Usage example:
Code:
$('#t1').textbox('hide');  // hide the textbox
$('#c1').combobox('hide');  // hide the combobox

Thank you!
2  General Category / EasyUI for jQuery / How to hid textBox and combobox on: November 30, 2014, 07:24:20 PM
How to hid textBox and combobox in IE11 .  $("#XX").hide(); $("#XX").css("display", "none"); does not work.
3  General Category / Bug Report / Re: Form submit bug on: November 11, 2014, 07:44:28 PM
When using the 'form' plugin to submit a form, you need to detect if the returned data is valid.
Code:
$('#ff').form('submit', {
success: function(data){
try{
var data = eval('('+data+')');
if (data.success){
console.log('ok')
}
} catch(e) {
console.log('err')
}
}
})
Thank you,but don't you think it is strange? and all of my response data have to have a fixed structure. And my process depends on the Property-'success' completely.I hope that the 'form' could have a error event.
4  General Category / Bug Report / Form submit bug on: November 11, 2014, 06:01:05 PM
I find that submit method can't accept error event.When the program produce a bug (server 500), the success event will happen.
I know EasyUI always validate mistake in validatebox, but some validate have to do in submit method(in back ground code,such as C# ,Java). When it's happen, I should catch and treat them.
But now, because of  current situation, I have to use $.ajax to submit my data in trouble. I have to collect data by explicit code.

so,for example,I have to submit my form data such as this type.

function save() {

        var nameCN = $('#txt_NameCN').textbox('getValue');
        var nameEN = $('#txt_NameEN').textbox('getValue');
        var indexCode = $('#txt_IndexCode').textbox('getValue');
        var remarks = $('#txt_Remarks').textbox('getValue');

        var data = {
            NameCN: nameCN,
            NameEN: nameEN,
            IndexCode: indexCode,
            Remarks: remarks
        }
        $.ajax({
            type: "POST",
            url: "/Kit/Save",
            data: data,
            dataType: "json",
            error: function (ajaxExceptionModel) {
                var obj = jQuery.parseJSON(ajaxExceptionModel.responseText);
                $.messager.alert('Error Info', obj.ErrorMessage, 'error');
            },
            success: function (operationResult) {
                showMessage("Save Successful");
            }
        });
    }
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!