What does This Error Mean?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KC

    #1

    What does This Error Mean?

    I am using JavaScript on an Acrobat form. the script stops at the line "else
    if (f32.value == "")"shown below. I get the following error message:
    SyntaxError: syntax error 133:(null) at line 134.

    Can someone give me an idea of what needs to be corrected?

    Thanks in advance for any help you can offer.

    else
    // Email form and data.
    this.mailDoc(tr ue, "requestform@wh ereiwork.com", "", "", "ROP Request Form
    Submission");
    else if (f32.value == "")



  • mscir

    #2
    Re: What does This Error Mean?

    KC wrote:
    [color=blue]
    > I am using JavaScript on an Acrobat form. the script stops at the line "else
    > if (f32.value == "")"shown below. I get the following error message:
    > SyntaxError: syntax error 133:(null) at line 134.
    >
    > Can someone give me an idea of what needs to be corrected?
    >
    > Thanks in advance for any help you can offer.
    >
    > else
    > // Email form and data.
    > this.mailDoc(tr ue, "requestform@wh ereiwork.com", "", "", "ROP Request Form
    > Submission");
    > else if (f32.value == "")[/color]

    Is f32 a text input on a form? Did you try using something like:

    if (document.forms["formname"].f32.value=="")

    If that wasn't it, how about posting the url or the whole page.
    Mike

    Comment

    • Richard Cornford

      #3
      Re: What does This Error Mean?

      KC wrote:[color=blue]
      > I am using JavaScript on an Acrobat form. the script stops at the
      > line "else if (f32.value == "")"shown below. I get the following
      > error message: SyntaxError: syntax error 133:(null) at line 134.
      >
      > Can someone give me an idea of what needs to be corrected?
      >
      > Thanks in advance for any help you can offer.
      >
      > else
      > // Email form and data.
      > this.mailDoc(tr ue, "requestform@wh ereiwork.com",
      > "", "", "ROP Request Form Submission");
      > else if (f32.value == "")[/color]

      The syntax for an - if - statement (ECMA 262 3rd edition Section 12.5)
      is:-

      if ( Expression) Statement else Statement

      - or -

      if ( Expression ) Statement

      - and because those - if - statements are statements they may be
      inserted into the syntax of an - if - statement at the points where -
      Statement - appears.

      However, the syntax you have used is:-

      if ( Expression) Statement else Statement else Statement

      (with the final Statement being - if (f32.value == "") ... )

      - and you cannot replace - Statement - in either of the - if - syntaxes
      and get the form that you have used.

      Richard.


      Comment

      • Douglas Crockford

        #4
        Re: What does This Error Mean?

        > I am using JavaScript on an Acrobat form. the script stops at the line "else[color=blue]
        > if (f32.value == "")"shown below. I get the following error message:
        > SyntaxError: syntax error 133:(null) at line 134.
        >
        > Can someone give me an idea of what needs to be corrected?
        >
        > Thanks in advance for any help you can offer.
        >
        > else
        > // Email form and data.
        > this.mailDoc(tr ue, "requestform@wh ereiwork.com", "", "", "ROP Request Form
        > Submission");
        > else if (f32.value == "")[/color]

        You have a syntax error in your program. Try running your script through
        jslint. It may give you a better error message.


        Comment

        • kc

          #5
          Re: What does This Error Mean?


          Thanks for the help. After reviewing my script, I realize that it is a
          mess partly because I am repeating a large portion of the script over
          and over vs using a function.

          I'm going to reconfigure it, and hopefully that will solve the problem.
          If not, it will make it easier to find.

          Kenn


          *** Sent via Developersdex http://www.developersdex.com ***
          Don't just participate in USENET...get rewarded for it!

          Comment

          Working...