This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (๐ŸŒน) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (๐Ÿ“š) this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
stewards:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

pop-up confirmation window for html:submit

 
pioneer
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.
 
master steward
Posts: 15023
251
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • 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
pioneer
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, that solved the problem.
 
Does this tiny ad smell okay to you?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!