Hello everyone,
I'm trying to pass a textbox id as a parameter to an external javascript file but its not working.
here is my textbox
and here is the function in my external javascript file
basically i'm trying to check the radio button if the textbox is clicked on. I've tried adding attributes to my textbox on pageload but no success. Any help would be greatly appreciated thanks.
I'm trying to pass a textbox id as a parameter to an external javascript file but its not working.
here is my textbox
VB.NET:
<asp:TextBox runat="server" ID="txt_merchant_number" CssClass="txtFlat" onclick="check_by_number('<%= this.by_number.ClientID %>')"
ClientIDMode="Static"></asp:TextBox>
and here is the function in my external javascript file
VB.NET:
function check_by_number(val) {
document.getElementById(val).checked = true;
}
basically i'm trying to check the radio button if the textbox is clicked on. I've tried adding attributes to my textbox on pageload but no success. Any help would be greatly appreciated thanks.