I have got an old asp.net webpage which is related a js and a cs files. When I press F5, VS is giving me error: "0x800a138f - JavaScript runtime error: Unable to get property 'txtAppl' of undefined or null reference." How can I solve this issue?
- <%@ 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
- {
- System.Text.StringBuilder output = new System.Text.StringBuilder();
- public string tblBuilder(string department, string un)
- {
- int dept = int.Parse(department);
- string dom;
- dom = "
";
- dom += "<input type = 'text' name = 'txtAppl' value = '' size=16 id = 'Text1'>P>";
- return output.ToString();
- }
- }
7 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nilesh ShahPosted Jun 21, 2017, 1:05 AM
abdujalil chulievPosted Jun 21, 2017, 12:22 AM
Nilesh ShahPosted Jun 20, 2017, 3:08 PM
Rajkiran Swain
Mani Kandan
:)Rajkiran SwainPosted Jun 20, 2017, 2:51 PM
document.formSelectis undefined. You need to debug to find out why that isNilesh ShahPosted Jun 20, 2017, 1:05 PM
Abhilash J APosted Jun 20, 2017, 12:36 PM
document.formSelectis undefined. You need to debug to find out why that is.tblBuilderfunction. What do you think is in theoutputvariable when you callToString()? Because it ain't what's indom...Vignesh ManiPosted Jun 20, 2017, 11:36 AM