"...Is null or not an object" 
Author Message
 "...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



Sun, 06 Feb 2005 04:46:43 GMT  
 "...Is null or not an object"
Hi

Well
<input type="radio" value="1" onchange=TransferUser(this.form)">

--
Best Regards
  Vidar Petursson
 ==============================
Microsoft Internet Client & Controls MVP
 ==============================
 http://www.icysoft.com/


 ==============================
  No matter where you go there you are
 ==============================

Quote:
> 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");
> }
> 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);
> }
> --------

> 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



Sun, 06 Feb 2005 05:03:22 GMT  
 "...Is null or not an object"
That did it.  Thank you.
Quote:
>-----Original Message-----
>Hi

>Well
><input type="radio" value="1" onchange=TransferUser
(this.form)">

>--
>Best Regards
>  Vidar Petursson
> ==============================
>Microsoft Internet Client & Controls MVP
> ==============================
> http://www.icysoft.com/


> ==============================
>  No matter where you go there you are
> ==============================


>> 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");
>> }
>> 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);
>> }
>> --------

>> 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");

- Show quoted text -

Quote:
>> -------

>> 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

>.



Sun, 06 Feb 2005 09:07:15 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. detecting "object required" or null object

2. detecting "object required" or null object

3. how to return a "null" object

4. Mysterious "Object not a collection"

5. "Invalid use of null"

6. datepart("h", mytime), problem with AM and PM

7. Not null, not empty, not "", what is it then?

8. Not null, not empty, not "", what is it then?

9. Disabling "BACK"/"FORWARD" buttons

10. CreateObject("Excel","//server"), MsgBox output

11. Problem With "window.showmodaldialog("")"

12. Disabling "BACK"/"FORWARD" buttons

 

 
Powered by phpBB® Forum Software