The ID of controls present in the content page will be changed if master page is used during rendering.
For your textbox
<asp:TextBox ID="txt_TotalFees" runat="server" Width="200px" onblur="SurName()" Enabled="false">
will become something like
You can see this by viewing the source of the webpage in the browser.
, if you are writing this in content aspx page (not your case).
var x = document.getElementById("<%= txt_TotalFees.ClientID %>");
It will not work in External js file.
2. Declare a global js variable in the aspx file
and set it to the ClientID value. Now in the external is file you can use getElementById on this var.
(try this one
You can use this one. Just add this attribute to the textbox like below.
<asp:TextBox ID="txt_TotalFees" runat="server" Width="200px" onblur="SurName()" Enabled="false" ClientIDMode="Static">
So, after rendering in browser the ID will be the same as
Then, the below line in External js will work.
var x = document.getElementById("txt_TotalFees");
To know more about the ClientIDMode refer - ASP.NET 4.0 : Manipulate ClientID using ClientIDMode
Try this solution and let me know.