Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pop-up confirmation window for html:submit

 
M Murthy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

How do i pop-up a confirmation window for a button?
I tried using the in the html:submit tag, and below is my confirmDelete function


But the problem with this is that the button gets submitted and calls the struts action even if the user clicks on cancel in the pop-up window.

I would appreciate any help.
 
Junilu Lacar
Bartender
Pie
Posts: 7311
45
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try

on click="javascript:return confirmDelete();"

See http://www.idocs.com/tags/linking/_A_onClick.html
 
M Murthy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, that solved the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic