Error "null or not an object" (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


LawrenceH -> Error "null or not an object" (12/2/2005 17:41:47)

Hi

I have a common .asp page, which writes the value contained in <%=session("S_SelectedHandover")%> to a field on a calling form called “HandoverPoint” With two other calling forms, everything works okay. In one case, I get the following error, when the page is loaded.

All the calling forms work in the same way.

Line: 11
Char: 1
Error: window.opener.document.FrontPage_Form1.HandoverPoint’ is null or not an object

Code: 0

Regards

Lawrence




dpf -> RE: Error "null or not an object" (12/2/2005 17:49:38)

quote:

window.opener.document.FrontPage_Form1.HandoverPoint’ is null or not an object
in dot syntax, you go downward from parent object to children......window.opener refers to the window from which your "pop up sprang" document refers to the html page.... next you have front page form and a form name - are they mutually exclusive? any chance that the page where it doesnt workderived from a page with no form?




LawrenceH -> RE: Error "null or not an object" (12/3/2005 7:25:57)

I don't think so. The other calling pages that work are almost idenical.

The full code is below.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<form name="FrontPage_Form1">

<script language="javascript">
function close_window(hop) {
window.opener.document.FrontPage_Form1.HandoverPoint.value=hop
mywin = window.close();
}
</script>

<%session("S_SelectedHandover")=request.form("SelectedHandover")
session("S_SelectedDescription")=trim(request.form("HanoverDetails"))
%>
<script language="javascript">

javascript:close_window('<%=session("S_SelectedHandover")%>')

</script>

</form>
</body>

</html>




BeTheBall -> RE: Error "null or not an object" (12/3/2005 10:53:53)

Could this be a typo?

<%session("S_SelectedHandover")=request.form("SelectedHandover")
session("S_SelectedDescription")=trim(request.form("HanoverDetails"))
%>

Should it be HandoverDetails?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.203125