0x800a138f - JavaScript runtime error: Cannot set src property that is undefined or null reference

patrick

Well-known member
Joined
Dec 5, 2021
Messages
251
Programming Experience
1-3
Hello
Please Help me.
0x800a138f - JavaScript runtime error: Cannot set src property that is undefined or null reference.

1.png

C#:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FaceMonitor.aspx.cs" Inherits="GcIOTWeb.Face.FaceMonitor" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>    
    <script type="text/javascript" src="../Common/js/default.js"></script>
    <script language="javascript" src="../Common/js/mainjs.js"></script>  

    <style type="text/css">
        .auto-style1
        {
            height: 1940px;
            width: 1900px;
        }
    </style>

    <script language="javascript" type="text/javascript">
        function ChangeMain(Pcode, Car, Cmt)
        {
            var Name = "document.Form1.img1101";
            var obj = eval(Name);

            obj.src = "image/Green.jpg";
            obj.alt = "";
        }

        function NewWin()
        {
            document.location.href = "FaceMonitor.aspx";
        }
    </script>
</head>
<body leftmargin="0" topmargin="0" ms_positioning="GridLayout">
    <form id="Form1" method="post" runat="server">
        <div style="overflow-x: hidden; overflow-y: scroll; text-align: center; width: 100%; height: 100%;">
            <table cellspacing="0" cellpadding="0" background="image/Face.jpg" border="0" class="auto-style1">
                <tr valign="top">
                    <td align="center">

                        <img id="img1101" name ="img1101" style="left: 32px; position: absolute; top: 118px" src="image/Red.jpg">
                 
                </td>
               </tr>
            </table>
            <iframe id="iTimerFrm" src="FaceMonitorTimer.aspx" frameborder="0" width="0" scrolling="no" height="0"></iframe>
        </div>
    </form>
</body>
</body>
</html>
C#:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FaceMonitorTimer.aspx.cs" Inherits="FaceMonitorTimer" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
        <script language="javascript">
            function Init()
            {
                <%=m_javaVal%>
                window.setTimeout("MornitoringTimer()", 2000);
            }
                  
            function MornitoringTimer()
            {
                document.location.href = "FaceMonitorTimer.aspx";
            }
        </script>
    </HEAD>
    <body MS_POSITIONING="GridLayout" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onload="javascript:Init()">
        <form id="Form1" method="post" runat="server">
            <input type="hidden" runat="server" id="ChkFlag" NAME="ChkFlag">
            <input type="hidden" runat="server" id="txtImageSrc" NAME="txtImageSrc">
            <input type="hidden" runat="server" id="SessionFlag" name="SessionFlag" />         
    </form>
</body>
</html>
C#:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;
using System.Text;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Drawing;
using System.Web.SessionState;
using GcIOTWeb.App_Class;
using System.Resources;


public partial class FaceMonitorTimer : System.Web.UI.Page
{
    public aspxMaster aspx = new aspxMaster();

    public string m_javaVal;
    protected string sFileName;

    protected void Page_Load(object sender, EventArgs e)
    {
        sFileName = "/Face/FaceMonitorTimer.aspx.cs";
         

        if (!Page.IsPostBack)
        {
            CheckStatus();

            aspx.sqlString = new StringBuilder();
            aspx.sqlString.Append("SELECT No, Value FROM IOT.dbo.MornitoringFace");

            DataSet ds = aspx.db.ExecuteForQuery_DataSet(aspx.sqlString.ToString(), sFileName);

            int nCnt = ds.Tables[0].Rows.Count;

            int nnn = 0;
        }
    }

    private void CheckStatus()
    {
        m_javaVal += ChangeMain();      // 메인
    }

    private string ChangeMain()
    {
        string strTemp = "";

        try
        {
            aspx.sqlString = new StringBuilder();
            aspx.sqlString.Append("SELECT No, Value FROM IOT.dbo.MornitoringFace");
            DataSet ds = aspx.db.ExecuteForQuery_DataSet(aspx.sqlString.ToString(), sFileName);

            DataTable dt = ds.Tables[0];
                   
            if (dt.Rows.Count > 0)
            {
               strTemp += "parent.ChangeMain('3','2','1');";
            }

            dt.Clear();
        }
        catch (Exception ex)
        {
            return null;
        }

        return strTemp;
    }  
 
}
 
Last edited by a moderator:
I don't understand what you mean.
====> Your Answer) provide a FULL and CLEAR explanation
please explain easily
You just used up all the irony in the universe. That's what I'm telling you: EXPLAIN! If your post doesn't tell us, in detail, what you're trying to achieve, how you're trying to achieve it, what happens when you try and how that differs from your expectations then it is inadequate. Your posts are VERY inadequate.
 

Latest posts

Back
Top Bottom