Object doesn't support property or method 'observable'

5 posts, 1 answers
  1. oakcool
    oakcool avatar
    5 posts
    Member since:
    Oct 2009

    Posted 04 Apr 2012 Link to this post

    Hi I am using the example for form binding and is not working at all, when I run it gives the message in the title.

    $(document).ready(function () {
            var viewModel = kendo.observable({
                email: "someemail@somesite.com",
                password: "p@ssword",
                passwordConfirmation: "p@ssword",
                confirmed: false,
                register: function (e) {
                    e.preventDefault();
     
                    this.set("confirmed", true);
                },
                startOver: function () {
                    this.set("confirmed", false);
                    this.set("email", false);
                    this.set("password", "Male");
                    this.set("passwordConfirmation", "John");
                }
            });
     
            kendo.bind($("#example"), viewModel);
        });

    The HTML is very similar to the one on the website as well.

    <div id="example" class="k-content">
        <div id="loginForm">
                    
            <div id="description">           
                <p>Some Text</p>
            </div>
             
            <div id="login">
                <h2>
                    Want us to get in touch with you</h2>
                <br />
                <form>
                    <label>
                        Email:
                        <input data-bind="value: email" /></label>
                    <br />
                    <br />
                    <label>
                        Password:
                        <input data-bind="value: password" /></label>
                    <br />
                    <br />
                    <label>
                        Confirmation:
                        <input data-bind="value: passwordConfirmation" /></label>
                    <br />
                    <br />
                    <button data-bind="enabled: agreed, click: register">
                        Register</button>
                    <br />
                    <div data-bind="visible: confirmed">
                        <h4>
                            Confirmation</h4>
                        <div>
                            Thank you for your registration, <span data-bind="text: email"></span>                                                                                                 
                            <br />
                            <br />
                            <button data-bind="click: startOver">
                                Start Over</button>
                        </div>
                    </div>
                </form>
            </div>
             
        </div>
    </div>


    Any ideas???
  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 04 Apr 2012 Link to this post

    Hello,

     You are probably using an older version of Kendo UI which does not support MVVM.

    Kind regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. oakcool
    oakcool avatar
    5 posts
    Member since:
    Oct 2009

    Posted 04 Apr 2012 Link to this post

    I got the one that available in Nuget, is that old?
  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 04 Apr 2012 Link to this post

    Hello,

     Yes, it hasn't been updated yet.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. oakcool
    oakcool avatar
    5 posts
    Member since:
    Oct 2009

    Posted 04 Apr 2012 Link to this post

    Ok now it worked thanks
Back to Top