You'd probably do better asking this on a list specific to javascript.

Nevertheless, that line with multiple consecutive double quotes looks
suspicious.  I would focus on that.

> -----Original Message-----
> From: KEITH KOSMICKI [mailto:[EMAIL PROTECTED]]
> 
> Can someone point out what I might be doing wrong here?
> I get a syntax error with the following code, I've counted
> it several times and I'm sure the If Elses and { }'s are correct.
> 
> Other than that It could be with the Recordset itself in the
> way it's defined.
> 
> Any help is appreciated.
> 
> Thank you,
> Keith Kosmicki
> 
> 
> 
> 
> function Validate(frmSuppAgenUpdate){
>         fUUAC=document.frmSuppAgenUpdate.SACode.value;
>         fUUAN=document.frmSuppAgenUpdate.SAName.value;
>         fUUAF=document.frmSuppAgenUpdate.SAFEIN.value;
>         fUUCO=document.frmSuppAgenUpdate.SACounty.value;
>         fUUAR=document.frmSuppAgenUpdate.SARegion.value;
>       
>         if (fUUAC==''){
>                 alert('Supplemental Agency code is a required 
> field.  Please try again.');
>                 document.frmSuppAgenUpdate.SACode.focus();
>                 return false;
>         } else {
>                 If (fUUAC!=5){
>                         alert('The Supplemental Agency code 
> must be 5 characters long.  Please try again.');
>                         document.frmSuppAgenUpdate.SACode.focus();
>                         return false;
>                 } else {
>                         Set RSSACode = 
> Server.CreateObject("ADODB.Recordset");
>                         SQLSACode = "SELECT COUNT(*) as 
> RECCNT FROM tblSupplementalAgency WHERE AgencyCode = """ & 
> fUUAC & """";
>                         RSSACode.open (SQLSACode, cnn);
>                         If (RSSACode.RECCNT > 0){
>                                 alert('The Supplemental 
> Agency code is a duplicate of an existing.  Please try again.');
>                                 
> document.frmSuppAgenUpdate.SACode.focus();
>                                 return false;
>                         } else {
>                                 return true;
>                         }
>                         RSSACode.close();
>                         RSSACode = null;
>                 }
>         }     
>       
>         if (fUUAN==''){
>                 alert('Supplemental Agency name is a required 
> field.  Please try again.');
>                 document.frmSuppAgenUpdate.SAName.focus();
>                 return false;
>         }
>       
>         if (fUUAF==''){
>                 alert('Supplemental Agency FEIN/TIN is a 
> required field.  Please try again.');
>                 document.frmSuppAgenUpdate.SAFEIN.focus();
>                 return false;
>         }
>       
>         if (fUUCO==-1){
>                 alert('County Name for the Supplemental 
> Agency has not been specified.  Please try again.');
>                 document.frmSuppAgenUpdate.SACounty.focus();
>                 return false;
>                 }
>               
>         if (fUUAR==-1){
>                 alert('Region for the Supplemental Agency ahs 
> not been specified.  Please try again.');
>                 document.frmSuppAgenUpdate.SARegion.focus();
>                 return false;
>         }
>       
>         return true;
>       
> }
> 
> ==============================================================
> ============To unsubscribe: mailto [EMAIL PROTECTED] with 
> body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set 
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
> 

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to