javascript stopped working after upgrading framework to .net 4.6

229 views Asked by At

I have a simple javascript code that autotabs on textboxes. It's working for many years even on framework 3.5. When we upgrade the web server (hardware and software) to include VS 2017 and framework 4.6, the simple js autotab stopped working but does not have errors. I can't decipher the root cause although I'm sure it's related to the upgrade. Can somebody give me an idea as to what can cause this?

<td valign="middle">
    <script language="javascript" type="text/javascript">
        function FocusNext(Cur, Next)
            {
            c=document.getElementById(Cur);
            if (c.value.length==c.maxLength) document.getElementById(Next).focus();
        }
    </script>
    <asp:TextBox ID="txtSSN1" runat="server" CssClass="textbox" size="3" MaxLength="3" onkeyup="javascript: FocusNext('ctl00_ContentPlaceHolder1_txtSSN1', 'ctl00_ContentPlaceHolder1_txtSSN2');" TextMode="Password" />
    -
    <asp:TextBox ID="txtSSN2" runat="server" CssClass="textbox" size="3" MaxLength="2" onkeyup="javascript: FocusNext('ctl00_ContentPlaceHolder1_txtSSN2', 'ctl00_ContentPlaceHolder1_txtSSN3');" TextMode="Password" />
    -
    <asp:TextBox ID="txtSSN3" runat="server" CssClass="textbox" size="4" onkeydown="return isNumberKey(event)" MaxLength="4" /><br />
    <asp:Label ID="lblssn" runat="server" CssClass="red" Visible="False" Font-Size="Smaller"></asp:Label>
</td>
0

There are 0 answers