Create a class with jQuery/javascript
<p>In a page I create an instance of a <code>class (MyClass)</code>, this class has 2 methods. But I'd like to do 2 things :</p>

<ol>
<li>In <strong>(1)</strong>, set the value <code>this.message</code></li>
<li>In <strong>(2)</strong>, call the information method or another method of the class</li>
</ol>

<p>Thank,</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
        var myClass = new MyClass("MyParam");
        $('#Target').click(function (event) {
            myClass.save("Test");
        });
    }); 
&lt;/script&gt;

function MyClass(myParam) {
    this.myParam = myParam;
    this.isError = false;
    this.message = "";
}

// Define the class methods.
MyClass.prototype = {
    save: function (action) {
        **(2)**
    },
    information: function (action) {
        **(1)**
    }
};
</code></pre>

<p><strong>Update1</strong></p>

<p>When I execute the code below the <code>data</code> value in <code>information</code> is show as <code>undifined</code></p>

<pre><code>MyClass.prototype = {

    click: function (action) {
        var myData;
        $.post(....., $("form").serialize(),
            function (data) {
                myData = data;
            });

        this.isError = this.information(myData);
    },

    information: function (data) {
        alert(data);
        return true;
    }

};
</code></pre>
