Do something like that:
<h:commandButton onclick="return confirmSubmit()"/>
In a extra js.File you must have something like:
function confirmSubmit()
{
var agree=confirm("Delete?");
if (agree)
return true ;
else
return false ;
}
-----Ursprüngliche Nachricht-----
Von: Debatin, Frank Felix [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 26. Januar 2006 12:50
An: [email protected]
Betreff: How to do Javascript Alert when pressing a button in ADF/JSF
Hello,
we're a (very happy) user of ADF faces. There is one thing that we
didn't find a solution for:
User presses a button, let's say "delete". We want a message box to
popup (Javascript alert?), that says something like "Are you sure to
delete? Y/N", and then continue standard processing if the user answers
yes (invoking the action).
Any ideas? Did we maybe overlook something simple and straightforward?
Is there the same problem in standard JSF? We are aware of the popup
dialog features in ADF, but would like to avoid them for well-known
reasons.
Regards
Frank Felix
______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.
This footnote also confirms that this email message has been swept
for the presence of computer viruses.
______________________________________________________________________