JQuery vars outside JS file
<p>In a header file i have which is populated by PHP: </p>

<pre><code>&lt;script type="text/javascript"&gt; 
var packages = {};
packages[1] = {title:'Pack 1',price:7.50,setup:0.00,template:0};
packages[2] = {title:'Pack 2',price:12.00,setup:0.00,template:0};
packages[3] = {title:'Pack 3',price:25.00,setup:75.00,template:1};
var templates = {};
templates[4] = {title:'Template 1'};
templates[5] = {title:'Template 2'};
templates[6] = {title:'Template 3'};
&lt;/script&gt;    

&lt;script type="text/javascript" src="/include/jscript/form.inc.js"&gt;&lt;/script&gt; 
</code></pre>

<p>Now in the form.inc.js i want the content of the vars packages. So like:</p>

<pre><code>function updatePrices(){
    var package_price = 0;
    var setup_price = 0;

    var package = $_2('#package_select').val();

    package_price += packages[package].price;
    setup_price += packages[package].setup;

    $_2(".package_price").html("&amp;pound;"+package_price);
    $_2(".setup_price").html("&amp;pound;"+setup_price);
    $_2(".total_price").html("&amp;pound;"+(package_price+setup_price));
}
</code></pre>

<p>You see here: packages[package].price that packages[1].price and should show 7.50, but i dont think the var packages is being passed though!</p>

<p>Any help would be awesome thanks</p>
