I would like to have this function:
function count(inputObj, ouputObj)
{
outputObj.value = inputObj.value.length;
}
And I would like to call it in this way:
<asp:TextBox ID="txtUSERGUID" runat="server" onkeyup="count(this, document.getElementById('<%=txtUSERGUIDLength.ClientID%>'));" onkeydown="count(this, document.getElementById('<%=txtUSERGUIDLength.ClientID%>'));" />
<asp:TextBox ID="txtUSERGUIDLength" runat="server" />
<asp:Label ID="lblUSERGUIDLength" runat="server" Text="chars" />
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?