wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 4442
    
    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
help me with this javascript code
Problem with pop-up window
callback in javascript
Problem in window.close; page get requested again
How to do pop-up window in a form?