TypeError with Validator

4 posts, 0 answers
  1. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 21 Mar 2013 Link to this post

    Hi support,

    I'm using the Kendo Framework Validator together with Siteifnity.
    I'm getting this error when running my page:

    Timestamp: 21-3-2013 14:18:05
    Error: TypeError: $(...).kendoValidator is not a function
    Line: 909
    This is the code I use in my page:
    $(document).ready(function () {
     
           $('#addReview').hide();
     
           var validator = $("#addReview").kendoValidator().data("kendoValidator");
           //status = $(".status");
     
           $("<%=submit.ClientID %>").click(function () {
               if (validator.validate()) {
                   status.text("Hooray! Your tickets has been booked!")
                       .removeClass("invalid")
                       .addClass("valid");
               } else {
                   status.text("Oops! There is invalid data in the form.")
                       .removeClass("valid")
                       .addClass("invalid");
               }
           });
     
       });
    Any thoughts?

    Kind regards,
    Daniel
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 25 Mar 2013 Link to this post

    Hi Daniel,

    Thank you for getting in touch with us.
    This topic explains where the problem comes from and what is the solution.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 26 Mar 2013 Link to this post

    Hi Alexander,

    Thanks for your reply.
    I checked the article, but I'm sure jQuery is loaded once and Kendo is loaded after jQuery.

    Strange thing is that the validation seems to work okay. Just getting this javascript error on my pages, which causes any other script to stop running.

    Daniel
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 26 Mar 2013 Link to this post

    Hello Daniel,

    Could you please provide a small example that isolates the issue? In this way I would be able to examine what exactly is going wrong and assist you further.
    Thank you in advance for the cooperation.

    Regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready