aspose file tools
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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: 5347
    
  13

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