Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
pop-up confirmation window for html:submit
M Murthy
Ranch Hand
Posts: 33
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
How do i pop-up a confirmation window for a
<html:submit>
button?
I tried using the
on click="confirmDelete();"
in the html:submit tag, and below is my confirmDelete function
<script> function confirmDelete() { delete = confirm("Delete?"); if(delete == true) { return true; } else { return false; } }
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.
Sindhu Murthy<br />SCJP 1.4<br />SCBCD
Junilu Lacar
Sheriff
Posts: 17644
300
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
try
on click="javascript:return confirmDelete();"
See
http://www.idocs.com/tags/linking/_A_onClick.html
M Murthy
Ranch Hand
Posts: 33
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thank you, that solved the problem.
Sindhu Murthy<br />SCJP 1.4<br />SCBCD
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
help me with this javascript code
how to restrict form submit
Button in JSF
Javascript confirm delete
Problem in window.close; page get requested again
More...