Workflow Soluiton

 View Only
  • 1.  How to prevent double-clicks on web forms ?

    Posted Aug 17, 2011 06:58 AM

    In Workflow-type and Forms-type projects Form Builder Components have functionality allowing to display processing message after submitting the web form. Unfortunately this feature is not reliable and many times does not obscure the whole form or it is not enough quick to prevent double-clicks done by users. Double-click on form in most cases ends with exception because components on output path are executed twice. As a prevention is required a more effective mechanism - e.g. something like "blockUI" plugin for jQuerry library. In previous versions of Workflow Solution has been used a special script "composerForm.aspx" which let integrate with jQuerry for servicing processing message functionality. Newer versions seem no longer using this script so managing with double-clicks errors become a problem again. I will be grateful for any suggestion how to solve it.



  • 2.  RE: How to prevent double-clicks on web forms ?

    Posted Aug 25, 2011 02:35 PM

    AnaMan, sorry this is a week or so since you've asked, but if you still need this, try this:

    in the form builder, right-click the form itself and click the Behavior tab.  in the "Script" section, enter

    var hiddenFlag=0

    then on your Button, use the following "onmouseup" javascript control:

    if (hiddenFlag==1) {this.disabled=true;}
    else {hiddenFlag=1;}

    that seems to be working for me.  let me know if it doesn't do the trick for you, or if you have any questions about the scripts.  this should disable the button if it's clicked a second time.

    notes: the "onsubmit" control would likely have worked best, but workflow doesn't allow for that control.  "onclick" didn't respond so well when quickly doubleclicking. 



  • 3.  RE: How to prevent double-clicks on web forms ?

    Posted Aug 29, 2011 05:04 AM

    I know this trick and sometimes I used it in simpler applications. Unfortunately in applications for large number of users (we have application for over 1500 users) it is not sufficiently reliable because it blocks only one pressed button.

    We often develop forms containing several buttons (4 to 10) and typically we encounter two scenarios of users "creativity":

    1) "Oh, it was't the button I wanted to click!" - user clicks one button and just after that (when the form is still active) she/he clicks another button. Believe me, under such pressure some of them have reflex like Counter Strike players ;-)

    2) "Why does it take so long?!" - user clicks the button but form is processed a bit long and she/he starts clicking others available and still active buttons. Oh, and "the patience gap" seems to shorten rapidly just before the end of a workday ;-)

    We really need to use something more reliable.