The SimpleDialog extends the Dialog. It's used to get the result of a single question, much like a standard JavaScript confirm box, but with a lot more power. It can also be styled, by using the default sam
skin, or by overriding this to add custom styling.
The example for this section will make use of the SimpleDialog to replace the built-in window.confirm()
prompt. However, we'll fall far short of the full capabilities of the SimpleDialog, after all, like Dialog, this element also has full AJAX capabilities and it can contain very elaborate HTML inside. However, the component is meant to do simple tasks so we'll keep it simple on purpose.
We'll use it to confirm the rating assigned to an image before sending it to the server. We won't add any HTML, the SimpleDialog will be build entirely through code and, in fact, it might well be built as a separate component to add to our own library of tools, by first defining a suitable namespace and placing it there...