Re: Syntax Error ???

From: Robert Nurse (rnurse_at_cudbytech.net)
Date: 09/10/04


Date: 10 Sep 2004 05:49:45 -0700

Hi Malc,

This function serves as the onSubmit even handler in a web
application. It either submits the form if everything is OK or it
doesn't. I'll try putting that If statement on one line and see what
happens. Our development server is down for the next few minutes. So
I won't know for a while.

As you can imagine, I'm new to VBScript. I took over development of
this portion of the application from a VBScript enthusiast.

mksmith@cix.compulink.co.uk (Malcolm K Smith) wrote in message news:<memo.20040910003812.5300E@mksmith.aits-uk.net>...
> In article <a967f5b9.0409091207.79773f47@posting.google.com>,
> rnurse@cudbytech.net (Robert Nurse) wrote:
>
> > If StrComp( strAction, "Update Record", VBTextCompare ) = 0 OR
> > StrComp( strAction, "Update and Close", VBTextCompare ) = 0 OR
> > StrComp( strAction, "Add New Record", VBTextCompare ) = 0 Then
> > document.myForm.submit
> > Exit Function
> > End If <<< ERROR IS HERE SUPPOSEDLY
>
> Have you put this pile of If statements onto one line or used Line
> Continuation characters? This may be the problem.
>
> As a matter of interest, what will the function return at this point? I
> always try to have one exit point from a routine and if it is a function I
> try to ensure that it returns something.
>
> - Malc



Relevant Pages