Hi list

perhaps another newbie like me will appreciate this tip: To have an action require double confirmation (WOConfirmPanel only asks once) I did this: made a dblconfirm.scp file and added it into web resources. Contents of the script file:

function dblconfirm(prompt)
{
 if (confirm(prompt) && confirm("CONFIRM: "+prompt))
 { return true; }
 else
 { alert("Cancelled."); return false; }
}

Added a WOJavaScript to the component (binding scriptFile to "dblconfirm.scp"). For every hyperlink that needs double confirmation I added a custom binding attribute "onClick" with following binding: "return dblconfirm('Really delete the record?')"

It may be a really newbie problem and solution but I am certain that it might be handy to someone else as well as to me.

Regards,
Boris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to