
"...Is null or not an object"
What does the above error mean? I have the following
script defined in my ASP page.
------------------------
<script Language="JavaScript" Type="text/javascript">
function TransferUser(theForm)
{
window.open("employee_transfer.asp?username=" +
theForm.full_name.value, "_top");
Quote:
}
function AccountRequestValidator(theForm)
{
if (theForm.full_name.value == "")
{
alert("Please enter a value for the \"Full Name\"
field.");
theForm.full_name.focus();
return (false);
}
if (theForm.full_name.value.length < 3)
{
alert("Please enter at least 3 characters in the
\"Full Name\" field.");
theForm.full_name.focus();
return (false);
}
if (theForm.full_name.value.length > 40)
{
alert("Please enter at most 40 characters in the
\"Full Name\" field.");
theForm.full_name.focus();
return (false);
}
var radioSelected = false;
for (i = 0; i < theForm.ChangePosition.length; i++)
{
if (theForm.ChangePosition[i].checked)
radioSelected = true;
}
if (!radioSelected)
{
alert("Please select one of the \"Change Position\"
options.");
return (false);
}
if (theForm.Plant.selectedIndex == 0)
{
alert("Please select one of the \"Plant\" options.");
theForm.Plant.focus();
return (false);
}
if (theForm.Send_to.value == "")
{
alert("Please enter a value for the \"User to Notify\"
field.");
theForm.Send_to.focus();
return (false);
}
if (theForm.Send_to.value.length < 2)
{
alert("Please enter at least 2 characters in the
\"User to Notify\" field.");
theForm.Send_to.focus();
return (false);
}
if (theForm.Send_to.value.length > 25)
{
alert("Please enter at most 25 characters in the
\"User to Notify\" field.");
theForm.Send_to.focus();
return (false);
}
if (theForm.RemoveUser.checked)
{
if (theForm.RemoveDate.value == "")
{
alert("Please enter a value for the
\"Remove Date\" field.");
theForm.RemoveDate.focus();
return (false);
}
if (theForm.RemoveDate.value.length < 6)
{
alert("Please enter at least 6 characters
in the \"Remove Date\" field.");
theForm.RemoveDate.focus();
return (false);
}
if (theForm.RemoveDate.value.length > 10)
{
alert("Please enter at most 10 characters
in the \"Remove Date\" field.");
theForm.RemoveDate.focus();
return (false);
}
}
return (true);
Quote:
}
--------
The AccountRequestValidator function fires correctly,
however when the TransferUser function fires, I
get "full_name is null or not an object". I have tried
the following variations of that line:
------
window.open("employee_transfer.asp?username=" +
theForm.full_name.value, "_top");
window.open("employee_transfer.asp?username=" +
(theForm.full_name.value), "_top");
window.open("employee_transfer.asp?username=" + escape
(theForm.full_name.value), "_top");
window.open("employee_transfer.asp?username=" + escape
(document.forms.FrontPage_Form1.full_name.value, "_top");
-------
The calling statements for both functions are:
<form method="POST" action="--WEBBOT-SELF--"
onsubmit="return AccountRequestValidator(this)"....
--and---
<input type="radio" value="1" onchange=TransferUser(this)
name="ChangePosition">
Any ideas?
Thanks.
Scott Fox, mcse-nt4