Jquery Tooltipster with Validate - Warning? Non-standard document.all property was used

722 Views Asked by At

I am looking to use the Jquery Validate combined with Tooltipster in a similar way to the example provided by Sparky on Feb 7th '13: How to display messages from jQuery Validate plugin inside of Tooltipster tooltips?

The difference being that the validation method is via a script function and not a form submit. I also want to attach the tooltips to a class instead of the whole form inputs. Once validation is complete the function calls another function.

It works but shows the following warning:

Non-standard document.all property was used. Use W3C standard document.getElementById() instead.

which I believe document.all is deprecated and not existent in future browser versions. Yet I don't understand why my code is showing the warning! I have eliminated all other possibilities of the cause withing my code. So I think its either something I am not seeing or the Tooltips + Validation combined libraries which is causing the warning.

Here is my JS code:

// initialize tooltipster on text input elements
    $('.valid1').tooltipster({
        trigger: 'custom',
        onlyOne: false,
        position: 'right'
    });

    // initialize validate plugin on the form
    var validator = $('#propCreate').validate({
    onsubmit: false,
        errorPlacement: function (error, element) {
            $(element).tooltipster('update', $(error).text());
            $(element).tooltipster('show');
        },
        success: function (label, element) {
            $(element).tooltipster('hide');
        },
        rules: {

            pkg: { required: true },
            TCaccept: { required: true }

        },
        messages: {
            TCaccept: "Please check acceptance of our terms.",
            pkg: "Please select suitable package."
        },
        submitHandler: function (form) { 

        }

    });
//Validation
// this is to validate terms checkbox & Pkg
$("#btnNext").click(function () {
    if (validator.form()) {
        btnNextContinued()
    }
});

Does anybody have a fix/workaround for this or can show me where I am going wrong?

UPDATE : Following great observation by Sparky and his helpful comments - A bug in Firebug was the cause of a false positive warning. Tooltipster with Validate radio's and checkbox validation without a form submit works fine at this time.

1

There are 1 best solutions below

0
On BEST ANSWER

I'm not seeing the reported Non-standard document.all property warning message in any of the demos.

Is your Firebug up to date? I was reading about this "Non-standard document.all property" warning as part of a Firebug bug and nothing more.

The more I look into this, the more it seems like a non-issue.