This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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 Head First Android 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: 6264
    
  15

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.
 
Don't get me started about those stupid light bulbs.
 
subject: pop-up confirmation window for html:submit
 
It's not a secret anymore!