Skip to main content

Problem:

This demo shows how to prevent user from submitting the form more than once using JavaScript.

Resolution:

INTRODUCTION

==========

This demo shows how to prevent user from submitting the form more than once using JavaScript.

SOURCE FILES:

==========

Program Files               Description

-----------------------     -----------------------------------------------------------

mycgi.cbl                     CGI program

Copy Files:

-----------------------     -----------------------------------------------------------

mycgi.cpf                    Generated by Form Designer

mycgi.cpv                   Generated by Form Designer

mycgi.cpy                   Generated by Form Designer

Form Files:

-----------------------     -----------------------------------------------------------

HTMLPage.htm           Input form (containing JavaScript)

HTMLPageOut.htm     Output form

JavaScript Files:

-----------------------     -----------------------------------------------------------

mfcommon.js               Added by Form Designer (from \\NetX\\base\\bin)

OPERATION:

========

1. Load JS-SubmitOnce.app into Net Express

2. Click Project > Update All Dependencies

3. Click Project > Rebuild All

4. Click Animate > Run (or F5 or click on the Running-man button)

5. Test to see if the form allows to submit more than once

NOTE:

====

Bear in mind that the enter key allows to submit a form as well, and the JavaScript in input form takes that in consideration.

Another way to prevent the user from submitting more than once would be by disabling the submit button after the first submit.

==========================================================

Keywords: demonstration, sample, example, demo, web programming, ftpdemo.zip

demo.ex

demo.ne

demo.se

Attachments:

JS-SubmitOnce.zip

Old KB# 4204