We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Char 1 Object expected

JohnLucania
JohnLucania asked
on
Medium Priority
878 Views
Last Modified: 2008-01-09
I am getting this error:

Line 569
Char 1
Object expected

Line 569 is:

<INPUT TYPE="text" NAME="EmerPhone" ONBLUR="formatPhoneNumber(this);"

This entire codes are:

 <html>
<head>
<STYLE TYPE="text/css">
BODY {scrollbar-face-color: #0063F7; scrollbar-shadow-color: #ffffff; scrollbar-highlight-color: #ffffff; scrollbar-3dlight-color: #3399cc; scrollbar-darkshadow-color: #333333; scrollbar-track-color: #0052E7; scrollbar-arrow-color: #ffffff;}
a:link {text-decoration:none; font-family: san serif; font-size:14px; color: #00008B; }
a:visited { text-decoration:none; font-family: san serif; font-size:14px; color: navy;  }
a:hover { text-decoration:none; font-family: san serif; font-size:14px;  color: #FF0000; border-bottom:1px solid crimson}
@media print {
      .dontprint {display:none;visibility:hidden;}}
</style>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/CFIDE/scripts/cfform.js"></SCRIPT>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

function  _CF_checkGetSearch(_CF_this)
{
      if  (!_CF_hasValue(_CF_this.txtSearch, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.txtSearch, _CF_this.txtSearch.value, "Please enter Last/First Name or Client ID that you are looking for"))
            {
                  return false;
            }
      }

      return true;
}


//-->
</SCRIPT>


<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

function  _CF_checkClientUpdateView(_CF_this)
{
      if  (!_CF_hasValue(_CF_this.Zip, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.Zip, _CF_this.Zip.value, "Please enter Zip!"))
            {
                  return false;
            }
      }

      if  (!_CF_hasValue(_CF_this.DOB, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.DOB, _CF_this.DOB.value, "Please enter Date of Birth!"))
            {
                  return false;
            }
      }

      if  (!_CF_hasValue(_CF_this.LastName, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.LastName, _CF_this.LastName.value, "Please enter Last Name!"))
            {
                  return false;
            }
      }

      if  (!_CF_hasValue(_CF_this.Phone, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.Phone, _CF_this.Phone.value, "Please enter Phone Number!"))
            {
                  return false;
            }
      }

      if  (!_CF_hasValue(_CF_this.EmerContact, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.EmerContact, _CF_this.EmerContact.value, "Please enter Name and Relationship!"))
            {
                  return false;
            }
      }

      if  (!_CF_hasValue(_CF_this.EmerPhone, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.EmerPhone, _CF_this.EmerPhone.value, "Please enter Phone Number of Emergency Contact!"))
            {
                  return false;
            }
      }

      if  (!_CF_hasValue(_CF_this.Address, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.Address, _CF_this.Address.value, "Please enter Address!"))
            {
                  return false;
            }
      }

      if  (!_CF_hasValue(_CF_this.FirstName, "TEXT" ))
      {
            if  (!_CF_onError(_CF_this, _CF_this.FirstName, _CF_this.FirstName.value, "Please enter First Name!"))
            {
                  return false;
            }
      }

      return true;
}


//-->
</SCRIPT>

</head>
<body class="dontprint">
<div align="center">
  <table width="100%" border="0">
    <tr>
      <td colspan="3">
        <div align="center"><img src="logo.gif" width="320" height="68"></div>
      </td>
    </tr>
    <tr>
      <td>
        <div align="left"><font color="##0000FF">Accessed at 23:48:47 PM on 03-22-2006
          </font></div>
      </td>

      <td>
        <div align="center">
          <p align="left">
          <div align="center"><font color="black"><b><img src="ball.gif" width="14" height="14">
            </b><b></b><b>.
            If not, please <a href="VanProgramlogout.cfm">click here</a>.<img src="ball.gif" width="14" height="14"></b></font></div>
        </div>
      </td>
      <td>
        <div align="right"><a href="VanProgramlogout.cfm"><img src="arrow.gif" width="17" height="17" border="0"><img src="logout.gif" width="108" height="20" border="0" alt="Please click to logout the system! "></a></div>
      </td>
    </tr>
  </table>
</div>
</html>

<title>Van Program</title>
<div align="center">
<table border="1" align="center">
    <tr>
      <td colspan="3">
        <div align="center"><b><font color="#CC0000" size="4"><img src="search.gif" width="86" height="28"></font></b></div>
      </td>
    </tr>
    <FORM NAME="GetSearch" ACTION="SearchClientResult.cfm" METHOD="POST" onSubmit="return _CF_checkGetSearch(this)">

      <tr>
        <td>
          <select name="SearchItem">
                <option value="LName">Last Name</option>
                  <option value="FName">First Name</option>
            <option value="ClientNo">Client ID</option>
          </select>
        </td>
        <td>
          <INPUT TYPE="text" NAME="txtSearch">
        </td>
        <td>
          <input type="submit" name="Submit" value="Go">
        </td>
      </tr>
    </FORM>

  </table>
</div>
<html>
<head>
<title>Van Program</title>
<script>
function formatPhone(obj)
{
     obj.value=obj.value.replace(/\D/g,"").replace(/^(\d{3})(\d{3})/,"$1-$2-")
}
</script>
</head>

<body bgcolor="FFFFFF" text="000000">      


<FORM NAME="ClientUpdateView" ACTION="ClientUpdateViewInsert.cfm" METHOD="POST" onSubmit="return _CF_checkClientUpdateView(this)">


    <table border="0" align="center" width="100%">
      <tr>
        <td colspan="4">
          <div align="center"><img src="ClientView.gif" width="125" height="36"></div>
        </td>
      </tr>
      <tr bgcolor="FFCCFF">
        <td bordercolor="CCCCCC" colspan="4">
          <div align="center"><b>Client</b></div>
        </td>
      </tr>
      <tr>
        <td bordercolor="CCCCCC" bgcolor="FFFFCC"><b>Title</b></td>
        <td bgcolor="CCCCFF">
          <select name="Title">
            <option value="DR">DR</option>
            <option value="NA"></option>
            <option value="DR">DR</option>
            <option value="MISS">MISS</option>
            <option value="MR">MR</option>
            <option value="MRS">MRS</option>
            <option value="MS">MS</option>
          </select>
        </td>
        <td bgcolor="FFFFCC"><b>Last Name</b></td>
        <td bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="LastName"
      
      
      
            
            
            
            
            
            
            
            
            
            
                   VALUE="Test1"
            
      
      
      
      >
      



        </td>
      </tr>
      <tr>
        <td bordercolor="CCCCCC" bgcolor="FFFFCC"><b>First Name</b></td>
        <td bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="FirstName"
      
      
      
            
            
            
            
            
            
            
            
            
            
                   VALUE="Test1"
            
      
      
      
      >
      



        </td>
        <td bgcolor="FFFFCC"><b>Middle Name</b> </td>
        <td bgcolor="CCCCFF">
          <input type="text" name="MI" value="T">
        </td>
      </tr>
      <tr>
        <td bgcolor="FFFFCC"><b>Date of Birth</b> </td>
        <td bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="DOB"
      
      
      
            
            
            
                   SIZE="10"
            
            
            
                   MAXLENGTH="10"
            
            
            
            
            
            
                   VALUE="01/01/1950"
            
      
      
      
      >
      



          <font color="990000">(mm/dd/yyyy)</font> </td>
        <td bgcolor="FFFFCC"><b>Street Address 1</b></td>
        <td bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="Address"
      
      
      
            
            
            
                   SIZE="50"
            
            
            
            
            
            
            
            
                   VALUE="1234 Test way"
            
      
      
      
      >
      



        </td>
      </tr>
      <tr>
        <td bgcolor="FFFFCC"><b>Street Address 2</b></td>
        <td bgcolor="CCCCFF">
          <input type="text" name="APT" value="">
        </td>
        <td bgcolor="FFFFCC"><b>City</b></td>
        <td bgcolor="CCCCFF">
          <select name="City">
            <option>BEREA</option>
            <option></option>
            <option>BEREA</option>
            <option>BROOK PARK</option>
            <option>COLUMBIA STATION</option>
            <option>MIDDLEBURG HTS</option>
            <option>OLMSTED FALLS</option>
            <option>STRONGSVILLE</option>
          </select>
        </td>
      </tr>
      <tr>
        <td bgcolor="FFFFCC"><b>Zip</b></td>
        <td bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="Zip"
      
      
      
            
            
            
                   SIZE="10"
            
            
            
                   MAXLENGTH="10"
            
            
            
            
            
            
                   VALUE="41032"
            
      
      
      
      >
      



        </td>
        <td bgcolor="FFFFCC"><b>Phone Number</b> </td>
        <td bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="Phone" ONBLUR="formatPhone(this)"
      
      
      
            
            
            
                   SIZE="14"
            
            
            
                   MAXLENGTH="14"
            
            
            
            
            
            
                   VALUE="123-456-7890"
            
      
      
      
      >
      



        </td>
      </tr>
      <tr>
        <td bgcolor="FFFFCC"><b>Lift</b></td>
        <td bgcolor="CCCCFF">
          <select name="Lift">
            <option>Yes</option>
            <option></option>
            <option>Yes</option>
            <option>No</option>
          </select>
        </td>
        <td bgcolor="FFFFCC"><b>Limits</b></td>
        <td bgcolor="CCCCFF">
          <select name="Limits">
            <option>BRING WHEELCHAIR WITH</option>
            <option></option>
            <option>BRING WHEELCHAIR WITH</option>
            <option>CANE</option>
            <option>ELECTRIC WC STAFF</option>
            <option>HAS HARD TIME WALKIN</option>
            <option>LEGALLY BLIND</option>
            <option>NONE</option>
            <option>WALKER</option>
            <option>WALKS VERY SLOW</option>
            <option>WHEELCHAIR</option>
          </select>
        </td>
      </tr>
      <tr bgcolor="FFFFCC">
        <td colspan="4"><b>Comments</b></td>
      </tr>
      <tr>
        <td colspan="4" bgcolor="CCCCFF">
          <textarea name="Comments" rows="5" cols="100">Test</textarea>
        </td>
      </tr>
      <tr>
        <td colspan="4" bgcolor="FFFFCC"><b>Directions</b></td>
      </tr>
      <tr>
        <td colspan="4" bgcolor="CCCCFF">
          <textarea name="Directions" rows="5" cols="100">test</textarea>
        </td>
      </tr>
      <tr bgcolor="FFCCFF">
        <td colspan="4">
          <div align="center"><b>Emergency Contact</b></div>
        </td>
      </tr>
      <tr>
        <td bgcolor="FFFFCC"><b>Name &amp; Relationship</b></td>
        <td bgcolor="CCCCFF">
       




      
      
      
      
      <INPUT TYPE="text" NAME="EmerContact"
      
      
      
            
            
            
            
            
            
            
            
            
            
                   VALUE="Father"
            
      
      
      
      >
      



        </td>
        <td bgcolor="FFFFCC"><b>Phone Number I</b></td>
        <td bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="EmerPhone" ONBLUR="formatPhoneNumber(this);"
      
      
      
            
            
            
                   SIZE="14"
            
            
            
                   MAXLENGTH="14"
            
            
            
            
            
            
                   VALUE="123-456-7890"
            
      
      
      
      >
      



        </td>
      </tr>
      <tr>
        <td bgcolor="FFFFCC"><b>Phone Number</b> <b>II</b></td>
        <td colspan="3" bgcolor="CCCCFF">
         




      
      
      
      
      <INPUT TYPE="text" NAME="EmerPhone1" ONBLUR="formatPhoneNumber(this);"
      
      
      
            
            
            
                   SIZE="14"
            
            
            
                   MAXLENGTH="14"
            
            
            
            
            
            
                   VALUE="123-456-7890"
            
      
      
      
      >
      



        </td>
      </tr>
      <tr>
        <td colspan="4" bgcolor="CCFFFF">
          <div align="center">
            <input type="submit" name="Submit" value="Submit">
            <input type="reset" name="Submit2" value="Reset">
          </div>
        </td>
      </tr>
    </table>
 
</FORM>

</body>
</html>

What is wrong?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2006

Commented:
Try running it in firefox and looking up the error in the javascript console. The warnings are much more detailed.

-r-

Author

Commented:
I am using IE 6.0, which is required.
CERTIFIED EXPERT
Top Expert 2006
Commented:
I understand, but mentioned it only for debugging purposes.

Do you have this page online.

At this stage the only thing I could deduct is that possibly the formatPhoneNumber function is not defined or included correctly.

-r-

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
>> possibly the formatPhoneNumber function is not defined or included correctly


Duhhhhh!!!  I got it!!!  formatPhone, not formatPhoneNumber!

function formatPhone(obj)
{
     obj.value=obj.value.replace(/\D/g,"").replace(/^(\d{3})(\d{3})/,"$1-$2-")
}
</script>

<INPUT TYPE="text" NAME="EmerPhone" ONBLUR="formatPhoneNumber(this);"
<INPUT TYPE="text" NAME="EmerPhone1" ONBLUR="formatPhoneNumber(this);"
CERTIFIED EXPERT
Top Expert 2006

Commented:
:-)

Glad I could help, although I expected this thread to take longer :-D

-r-
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.