This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes pop-up confirmation window for html:submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "pop-up confirmation window for html:submit" Watch "pop-up confirmation window for html:submit" New topic
Author

pop-up confirmation window for html:submit

M Murthy
Ranch Hand

Joined: Nov 20, 2004
Posts: 33
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.


Sindhu Murthy<br />SCJP 1.4<br />SCBCD
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4446
    
    5

try

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

See http://www.idocs.com/tags/linking/_A_onClick.html


Junilu - [How to Ask Questions] [How to Answer Questions]
M Murthy
Ranch Hand

Joined: Nov 20, 2004
Posts: 33
Thank you, that solved the problem.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: pop-up confirmation window for html:submit
 
Similar Threads
How to do pop-up window in a form?
help me with this javascript code
Problem with pop-up window
callback in javascript
Problem in window.close; page get requested again