how can I solve this JavaScript runtime error?

2

I have got an old ASP.NET web page. When I press F5, Visual Studio is giving me error:

0x800a138f - JavaScript runtime error: Unable to get property 'txtAppl' of undefined or null reference.

HTML page,

<%@ Page Language="C#" Debug="true" %>  

<script runat="server" src="uzpo2003_tbbuild.cs"></script>  
<html>  
<head>  
    <title></title>  
    <script type="text/javascript" src="uzpo2003_client.js"></script>  
</head>  
<body onload="form_load();">  
</body>  
</html>  

uzpo2003_client.js,

function form_load() {  
    if (document.formSelect.txtAppl.value == -99999999)  
    return null;      
}  

uzpo2003_tbbuild.cs,

public class TableBuild
{
    StringBuilder output = new StringBuilder();
    public string tblBuilder(string department, string un)
    {
        int dept = int.Parse(department);

        string dom;
        dom = "<center><table border='0' style='font:14pt;'  bgcolor='#A7C7B7'>";
        dom += "<input type = 'text' name = 'txtAppl' value = '' size=16 id = 'Text1'></P>";
        return output.ToString();
    }
}

How can I solve this problem?

javascript
asp.net
asked on Stack Overflow Jun 20, 2017 by Abhilash.J.A • edited Jun 20, 2017 by Heretic Monkey

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0