abdujalil  chuliev

abdujalil chuliev

  • NA
  • 400
  • 41.2k

JavaScript runtime error

Jun 20 2017 11:23 AM
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?
  1. <%@ Page Language="C#" Debug="true" %>  
  2.   
  3. <script runat="server" src="uzpo2003_tbbuild.cs"></script>  
  4. <html>  
  5. <head>  
  6.     <title></title>  
  7.     <script type="text/javascript" src="uzpo2003_client.js"></script>  
  8. </head>  
  9. <body onload="form_load();">  
  10. </body>  
  11. </html>  
  12. ====================================================================  
  13. uzpo2003_client.js:  
  14. function form_load() {  
  15.     if (document.formSelect.txtAppl.value == -99999999)  
  16.     return null;      
  17. }  
  18. ===================================================================  
  19. uzpo2003_tbbuild.cs:  
  20. public class TableBuild  
  21. {  
  22.     System.Text.StringBuilder output = new System.Text.StringBuilder();  
  23.     public string tblBuilder(string department, string un)  
  24.     {  
  25.         int dept = int.Parse(department);  
  26.   
  27.         string dom;  
  28.         dom = "<center><table border='0' style='font:14pt;'  bgcolor='#A7C7B7'>";  
  29.         dom += "<input type = 'text' name = 'txtAppl' value = '' size=16 id = 'Text1'></P>";             
  30.         return output.ToString();  
  31.     }  
  32. }  
 

Answers (7)