AlertMessage shows a dialog box on top of a page. AlertMessage has a method show, which creates and renders a dialog box. This method takes as argument a callback function, which is executed when the "accept"-button is pressed, message, a header message, text for the "accept"-button and text for the "decline"-button. The message, header message, text for "accept"-button, text for the "decline"-button are optional. The default values are shown in the following example.
AlertMessage needs the following css and javascript:
<link href="/yui/container/assets/container-core.css" rel="stylesheet" type="text/css"/>
<script src="/jquery/jquery-1.3.2.min.js" type="text/javascript" />
<script src="/yui/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"/>
<script src="/yui/element/element-min.js" type="text/javascript"/>
<script src="/yui/container/container-min.js" type="text/javascript"/>
<script src="/scripts/alert-message.js" type="text/javascript"/>
AlertMessage.show(function(){alert("done");}, "Are you sure you want to lose the unsaved changes", "Unsaved changes", "Yes", "No");