jQWidgets Forums

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: editable false in createeditor editable false in createeditor #79030

    toskf072
    Participant

    Ah….
    thank you Dimitar

    in reply to: titleFormat property titleFormat property #78981

    toskf072
    Participant

    thank you Dimitar.

    in reply to: reselect "selectedIndex – 1" reselect "selectedIndex – 1" #78951

    toskf072
    Participant

    thank you Dimitar..

    Oh..I think I have the wrong question to you.

    My intention is …

    Not change in the code, the end user can change in the UI.

    The ‘== ALL ==’ item will not be visible on the screen, so the end user can not select the ‘== ALL ==’ item.

    Will not this another way?

    in reply to: twice close callback twice close callback #78472

    toskf072
    Participant

    Thank you for your help…ivailo

    in reply to: twice close callback twice close callback #78371

    toskf072
    Participant

    hi ivailo..

    i saw a your sample code.. thanks..

    but i must make a button tag dynamically..

    so i made ‘buttonString’

    but because make a okbutton dynamically, okButton property is a null..

    so i defined okButton on next line..
    …………..

    Here is demo

    can you help me?
    Have a nice weekend..


    toskf072
    Participant

    Ahahaha…

    i found a solution.. thank you~~

    function domain(input, commit){
    //somthing….

    return true;
    }

    $(‘#form’).jqxValidator({
    rules: [{
    input: ‘#passwordInput’,
    message: ‘The password is required!’,
    action: ‘keyup’,
    rule: domain
    }]
    });


    toskf072
    Participant

    hi~

    i read api doc about “custom function”

    (‘#form’).jqxValidator( { rules: [{ input: ‘#passwordInput’,
    message: ‘The password is required!’,
    action: ‘keyup’,
    rule: ‘required’ },
    { input: ‘#passwordInput’,
    message: ‘Your password must be between 4 and 12 characters!’,
    action: ‘keyup’,
    rule: ‘length=4,12’ }] } );

    Custom Rule Definition. The function returns true or false depending on whether the input is correct or not.

    { input: ‘#birthInput’, message: ‘Your birth date must be between 1/1/1900 and 1/1/2012.’, action: ‘valuechanged’, rule: function () {
    var date = $(‘#birthInput’).jqxDateTimeInput(‘value’);
    var result = date.dateTime.getFullYear() >= 1900 && date.dateTime.getFullYear() <= 2012;
    return result;
    }

    but this case is not static…

    i want to reues rules after define rule function.

    see the sample..
    ———————————-
    jQuery.validator.addMethod(“domain”, function(value, element) {
    return this.optional(element) || /^http:\/\/mycorporatedomain.com/.test(value);
    }, “Please specify the correct domain for your documents”);

    $( “#form” ).validate({
    rules: {
    passwordInput: {
    // custom rule name
    domain: true
    }
    }
    });

    —————————————————–

    SO..
    how can i make a custom function for “REUSE” ?

    thanks for your answer.

Viewing 7 posts - 1 through 7 (of 7 total)