This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
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=""
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic