I should have looked at this more closely. You need to give your <Form> tag
the name "member_add_form". Just like:

<form action="member_add_action.cfm" method="post" name="member_add_form"
onSubmit="return checkForm()">

This should solve the issue...


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of [EMAIL PROTECTED]
> Sent: Wednesday, February 28, 2001 10:18 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Error message with JavaScript
>
>
>
> I am sorry for any confusion created by my messages. I still get the error
> message: JavaScript Error:
> http://statweb/henry/test/member_add_form.cfm, line 34:
>
> document.member_add_form has no properties.
>
> Below is whole form's code. Please look at the code in bold.
>
> Thanks,
>
> Henry
>
>
> <html>
> <head>
> <title>MAT - Manager's Forum Registration</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
>
> <script language="JavaScript">
>
> function IsBlank(str)
> {
> var intBlank = str.search(/[^\s+]/);
> if (intBlank)
> {
> noChars=str.search(/[^\S{str.length}]/);
> }
> else
> {
> noChars = 1;
> }
> if (noChars < 1)
> {
> return true;
> }
>  else
> {
> return false;
> }
> }
>
> function checkForm()
> {
>  if
>  ((IsBlank(document.member_add_form.FName.value)))
> {
>  alert("You left First Name blank.");
>  return false;
> }
> }
> </script>
>
> </head>
> <body bgcolor="006699">
>
> <table width="69%" border="0" cellspacing="0" cellpadding="2" align
> ="center">
>   <tr>
>     <td rowspan="3" width="13%">
>       <div align="right"><img src="file:///O%7C/Images/mat.png" width="50"
> height="60"></div>
>     </td>
>     <td colspan="2" width="87%">
>       <div align="center"><font face="Verdana, Arial, Helvetica,
> sans-serif" size="2" color="#FFFFFF"><b>Management
>         Action Team, Federal Reserve Bank of Dallas</b></font></div>
>     </td>
>   </tr>
>   <tr>
>     <td colspan="2" width="87%" height="21">
>       <div align="center"><font face="Verdana, Arial, Helvetica,
> sans-serif" size="2" color="#FFFFFF">Online
>         Registration Form - Manager's Forum</font></div>
>     </td>
>   </tr>
>   <tr>
>     <td colspan="2" width="87%">
>       <div align="center"><font face="Verdana, Arial, Helvetica,
> sans-serif" size="2" color="#FFFFFF">March
>         1-6, 2001</font></div>
>     </td>
>   </tr>
> </table>
> <p>&nbsp;</p>
> <p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size
> ="2" color="#FFFFFF">To
>   register for the Manager's Forum, please complete the form
> below:</font></p>
> <p>&nbsp;</p>
>
> <FORM ACTION="member_add_action.cfm" onSubmit="return checkForm()" METHOD
> ="post">
> <table cellspacing="2" cellpadding="2" border="0" align="center">
> <tr>
>     <td><font face="verdana, arial, helvetica, sans-serif"
> size="2" color="
> #FFFFFF">First Name:</font></td>
>     <td><input type = "text"
>      NAME = "FName"
>      SIZE = "15"
>      MAXLENGTH = "30">
>      </td>
> </tr>
>
> <tr>
>
>     <td><font face="verdana, arial, helvetica, sans-serif"
> size="2" color="
> #FFFFFF">Middle Initial:</font></td>
>     <td><INPUT TYPE "TEXT"
>           NAME = "MI"
>           SIZE = "2"
>           MAXLENGTH ="5">
>      </td>
> <tr>
>     <td><font face="verdana, arial, helvetica, sans-serif"
> size="2" color="
> #FFFFFF">Last Name:</font></td>
>     <td><INPUT TYPE "TEXT"
>           NAME = "LName"
>           SIZE = "15"
>           MAXLENGTH ="20">
>      </td>
> </tr>
> </tr>
> <tr>
>     <td><font face="verdana, arial, helvetica, sans-serif"
> size="2" color="
> #FFFFFF">Phone Ext:</font></td>
>     <td><INPUT TYPE "TEXT"
>           NAME = "Phn_ext"
>           SIZE = "15"
>           MAXLENGTH ="20">
>      </td>
> </tr>
>
> <tr>
>     <td><font face="verdana, arial, helvetica, sans-serif"
> size="2" color="
> #FFFFFF">Department:</font></td>
>     <td><INPUT TYPE "TEXT"
>           NAME = "Dept"
>           SIZE = "15"
>           MAXLENGTH ="20">
>      </td>
> <TR align="center">
>           <TD align="center" colspan="2" align="middle">
>                <INPUT TYPE="Button"
>                NAME="Action"
>                VALUE="Register Now"
>                align="middle"
>                onClick = "checkForm()">
>           </TD>
> </TR>
> </TABLE>
> </form>
>
> </body>
> </html>
>
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to