How to set the value to a variable in the script(.js) file from the script in aspx file
<p>Im having a variable 'multi' , the same name i used within the js file. I need to set a value to the variable within my aspx page and pass it on to the javascript file. Couldnt find any help. </p>

<p>aspx script code</p>

<p></p>

<pre><code>    var itemdata = [];
    var multi;
    //var plot;
    $(document).ready(function () {
        $.ajax({
            type: "POST",
            url: "ChartBinder.asmx/BindChart",
            data: "{}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (response) {
                //alert(multi);

                var resultObj = $.parseJSON(response.d);
                multi = resultObj;
               // alert(resultObj.Pie);
                multi.Trend = resultObj.Trend;
                //alert(multi.Trend);
                $.getScript('Scripts/highcharts.src.js', function () {
                    DrawPie(resultObj.Pie);
                    DrawTrend(resultObj.Trend);
                    // do something here

                });

            },
            error: function (msg) {
                alert("Error");
            }
        });
    });
</code></pre>

<p>js script</p>

<pre><code>(function () {
   var seriesCount = window.multi.Trend.length;

   var newcolors = [];

   for (i = 0; i &lt; seriesCount; i++) {
      newcolors[i] = multi.Trend[i].color;
   }
})
</code></pre>
