• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFFORM and onSubmit

Explorer ,
Jun 07, 2007 Jun 07, 2007

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

546

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2007 Jun 07, 2007

Copy link to clipboard

Copied

Try the onClick event of your submit button. Make sure your testing includes submitting the form with your Enter key.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 07, 2007 Jun 07, 2007

Copy link to clipboard

Copied

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..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2007 Jun 07, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation