3 Replies Latest reply on Jun 7, 2007 11:52 AM by Dan Bracuk

    CFFORM and onSubmit

    Rick Level 1
      CFFORM puts its own ONSUBMIT property in when the form is rendered. I need to use the ONSUBMIT feature to disable my submit button. Is there another way to do this besides using ONSUBMIT?

      Thanks.
        • 1. Re: CFFORM and onSubmit
          Dan Bracuk Level 5
          Try the onClick event of your submit button. Make sure your testing includes submitting the form with your Enter key.
          • 2. Re: CFFORM and onSubmit
            Rick Level 1
            I have actually tried that. However, in Internet Explorer the form will not submit or display any of the validation error messages. Works fine in Firefox though..
            • 3. Re: CFFORM and onSubmit
              Dan Bracuk Level 5
              If the intent is to prevent multiple form submissions, there are a couple of other ways to do it. Neither is perfect, but both require a deliberate effort to submit the form more than once.

              1. Use an intermediate page. On this page, validate the form inputs, convert the form variables to session variables and javascript.window.location to the real page.

              2. At the top of the form action page, display some html content and cfflush it. Then process your form.