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 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions01ForumsTop experts
Arun PottiAnswers in the forums20answers02
Tahir AnsariAnswers in the forums5answers03
Kamlesh KumarAnswers in the forums5answers04
Sam HobbsAnswers in the forums4answers05
Željko PerićAnswers in the forums3answersFull leaderboard →
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Nilesh ShahRank #42 · 34.2K reputationPosted Jun 20, 2017, 11:08 AM EDT
Rajkiran Swain
Mani Kandan
:)Nilesh ShahRank #42 · 34.2K reputationPosted Jun 20, 2017, 9:05 AM EDT
abdujalil chulievRank #4,912 · 319 reputationPosted Jun 20, 2017, 8:22 PM EDT
Nilesh ShahRank #42 · 34.2K reputationPosted Jun 20, 2017, 9:05 PM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Jun 20, 2017, 8:36 AM EDT
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 ManiRank #98 · 22.1K reputationPosted Jun 20, 2017, 7:36 AM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jun 20, 2017, 10:51 AM EDT
document.formSelectis undefined. You need to debug to find out why that is