Pass asp control as parameter to javascript
<p>I would like to have this function:</p>

<pre><code>function count(inputObj, ouputObj)
{
   outputObj.value = inputObj.value.length;
}
</code></pre>

<p>And I would like to call it in this way:</p>

<pre><code>&lt;asp:TextBox ID="txtUSERGUID" runat="server" onkeyup="count(this, document.getElementById('&lt;%=txtUSERGUIDLength.ClientID%&gt;'));" onkeydown="count(this, document.getElementById('&lt;%=txtUSERGUIDLength.ClientID%&gt;'));" /&gt;

&lt;asp:TextBox ID="txtUSERGUIDLength" runat="server" /&gt;

&lt;asp:Label ID="lblUSERGUIDLength" runat="server" Text="chars" /&gt;
</code></pre>

<p>But I keep getting a javascript error that says: 'outputObj' is undefined.  Can I call this function like this or am I going the completely wrong direction?</p>
