JavaScript + Reference object in another function?
<p>If I create an object in an onLoad function, then attempt to reference that object within an onChange function, the object is 'undefined'... how do I reference it?</p>

<p><strong>HTML:</strong></p>

<pre><code>&lt;body onLoad="loaded()"&gt;
    &lt;select onChange="updateObject(event)"&gt;
        &lt;option value="v1"&gt;--v1--&lt;/option&gt;        
        &lt;option value="v2"&gt;--v2--&lt;/option&gt;
    &lt;/select&gt;
&lt;/body&gt;
</code></pre>

<p><strong>JS:</strong></p>

<pre><code>function loaded(){             
    var obj = new ObjectExample();
}
function updateObject(event){
    console.log(obj);
}
</code></pre>
