Javascript - passing value to a callback
<p>I have this JS code. I need to pass the loadItemUrl value to the callback function off loadStruct method. The loadStruct is a function of a JS framework that we're using.</p>

<p>In this example is the loadItemUrl value undefined in the inner scope of the callback function.</p>

<pre><code>Form.prototype.Create = function (loadItemUrl) {

     var dhxForm = new dhtmlXForm(this.divId);

     dhxForm.loadStruct(this.url, function () {

        if (loadItemUrl)
            this.load(loadItemUrl);

    });
}
</code></pre>
