Javascript asp.net c# multi objet pass to Js code file
<p>I have code on html page and it is working:</p>

<pre><code>document.getElementById('&lt;%=IdOstan.ClientID %&gt;').options.length = 0;
</code></pre>

<p>it is part of a function. Object is found and code run.
But if I move code to a seperate js file, then call the file using :</p>

<pre><code>&lt;script src="../../../../Script/AjaxCall.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p>then object is not found. My conclusion was that Object on the same file can be found with calling document.getElementById , but it is not true about object passed to Js, and seems normal.
I have tried to pass object while calling JS function like this :</p>

<pre><code>&lt;asp:DropDownList ID="IdLand" runat="server" onchange="UpdateOstan(this);" 
     DataTextField="NameLand" DataValueField="IdLand" ViewStateMode="Enabled" 
     AutoPostBack="false"&gt;
&lt;/asp:DropDownList&gt;
</code></pre>

<p>and it also works. But I need to pass a second object too I have tried :</p>

<pre><code>onchange="UpdateOstan(this, IdsecondObj);"
</code></pre>

<p>which failed, also this</p>

<pre><code>onchange="UpdateOstan(this, document.getElementById('IdSecondObject'));"
</code></pre>

<p>not working.
So pleas let me know how to pass html object to Javascript which is not on the same page.
<strong>I don't want to use jQuery files as helper,at all.</strong>
Thanks</p>
