Jump to content

 

teosu

Member Since 09 Oct 2014
Offline Last Active Yesterday, 08:41 PM
-----

Posts I've Made

In Topic: Ceformvalidator Problem With Ajax

10 January 2019 - 09:38 AM

its work on input blur event now. i iwll use this way until found another solution. thank you all


In Topic: Ceformvalidator Problem With Ajax

09 January 2019 - 06:44 AM

Ok new code here; but doesnt work first click, working with second click

 $(document).ready(function () {
               $('form button[type=submit]').on('click', function (e) {
                var input = $('#elm_38');
                $.ceAjax('request', fn_url('location.check_x'), {
                    method: 'post',
                    caching: false,
                    data: {x_field: input.val()},
                    callback: function (response) {
                        data = JSON.parse(response.result);

                        $.ceFormValidator('registerValidator', {
                            class_name: 'x_field',
                            message: 'error_xfield',
                            func: function(id) {

                                if(data == true) {
                                    console.log('x true');
                                    return true;

                                }else{
                                    console.log('x false');
                                    return false;
                                }
                            }
                        });
                    }
                });
            });
        });

what missing ?


In Topic: Ceformvalidator Problem With Ajax

08 January 2019 - 02:17 PM

$.ceFormValidator('registerValidator', {
                class_name: 'x_field',
                message: 'error_xfield',
                func: function(id) {
                    var input = $('#' + id);
                        $.ceAjax('request', fn_url('location.check_x'), {
                            method: 'post',
                            caching: false,
                            data: {x_field: input.val()},
                            callback: function (response) {
                                data = JSON.parse(response.result);
                                if (data == true) {
                                    console.log('x true');
                                    return true;
                                } else {
                                    console.log('x false');
                                    return false;
                                }
                            }
                        });

                }
            });

here is the code. all console logs its correct but registerValidator doesnt wait ceAjax result ? how can i fix that ?


In Topic: How Can I Add Value To Url ?

04 January 2019 - 05:56 AM

Ok mate i will try thank you

In Topic: Alexbranding - Premium Cs-Cart Template Unitheme

27 December 2018 - 01:27 PM

uni2 beta would be out this month ?