close ad
 
Important WebAssist Announcement
open ad
View Menu

Web development tutorial

Prevent users from clicking any submit button more than once

Tutorial created by Christopher West, Freelancer Looking for Work

Categories: Data Bridge, Free Tools, Dreamweaver, PHP

rating

Have you ever experienced a client coming back and stating their customers are experiencing problems with ecommerce orders not going through...this has happened to me and on investigation (with the help from the WebAssist forum) I concluded that is was due to customers pressing the webpage form submit button more then once (this can happen on webpages where the payment transaction can take a moment to process, thus making the customer think that nothing has happened)....Well...there is a solution and for any of you who own design extender its the Ewok of the WebAssist extensions...may I present...the WebAssist Progress Bar :)

arrow downRequirements

Dreamweaver
WebAssist Design Extender

arrow downPreparing

Before adding the WebAssist Progress Bar you need to select the code that you wish to apply it to.

The Progress Bar is mentioned many times for complimenting file upload for the WebAssist File Manipulation server behaviour...however if you consider that a file upload is a form element...this means it can be used for any situation that uses a form.

Step 1: Locating the Progress Bar Behaviour

The WebAssist Progress Bar is located via the WebAssist menu on the top of the main Dreamweaver menu bar and under the Forms sub menu.

Step 2: Customisation

WebAssist have kindly created different themes for the progress bar so that you can chose from a range of themes that can look good with your website design...I always like the Slate theme using the Bar category as this is nutural for practically any website design.

Step 3: The final look in your code

Here is a more indepth look at what the WebAssist Progress Bar behaviour has added to your code:

First is adds a javascript reference like so:

<script src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>



Secondly it wraps itself around your form, like so:

<div id="form1_ProgressWrapper">

<form>
...........
</form

</div>


Thirdly it adds the code which initialises the javascript function and using some CSS it hides the Progress Bar by default using display:none;

Like so;

<div id="form1_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('form1', 'form1_ProgressMessageWrapper', WADFP_Theme_Options['Bar:Slate']);
</script>
<div id="form1_ProgressMessage" >

<p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/slate-bar.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>

</div>



arrow downJust for fun

Please leave a comment in list form of what applications this can be used for:

I start of by suggesting

eCart PayPal Buy Now button

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating
rating

CraigR: 11 Years, 5 Months, 3 Weeks, 4 Days, 8 Hours, 2 Minutes ago

Like this, a much nicer solution than using a script to disable the button.

Would be nice if the 'Please wait...' message could be edited easily

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.