Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Prevent multiple submits (e.g. double clicks) in a4j:CommandLink  RSS feed

 
Himalay Majumdar
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried this to prevent double clicks, which dint work.



Please let me know if there is any other way. Also we dont use head/body tags in our .xhtml pages (I dunno why).

Thank you,
Himalay
 
bostian tov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try ignoreDupResponses?

Why do you have timeout on onclick event? Shouldn't you disable button when is pressed at that time?
 
Himalay Majumdar
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks bostian..I Will try ignoreDupResponses.
I had onclick="this.disable=true" before..it worked..but when the user double clicks very fast, it fails and makes two request before disabling.
 
bostian tov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try both: onclick="" ondblclick=""
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!