Oh, I've just shown one small example in the demo area. Dojo's event system
is very powerful, see http://dojotoolkit.org/docs/dojo_event_system.html.

Using the docs referenced above I would probably create the form as per
normal, only changing the javascript in the demo to be something more like:

<script type="text/javascript">
dojo.require("dojo.widget.Dialog");
var dlg;
function init(evt) {
dlg = dojo.widget.manager.getWidgetsByType("Dialog")[0];
dojo.event.connect(document.getElementById("myCancelButton"), "onClick",
dlg, "hide");
dojo.event.connect(document.getElementById("mySubmitButton"), "onClick",
dlg, "hide");
}
dojo.event.connect(window, "onload" , "init");
</script>

The closeControl method is just a sort of shortcut.

jesse

On 10/25/05, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hello there! Regarding the Dialog component. I was wondering, can we
> define
> more than one closeControl? Users are questioning that what if they do not
> want to post the form, but cancel it, how can they return to the page. In
> the example only by posting it (submit element) they could close the
> window.
>
> Regards
>
> --
> Vinicius Caldeira Carvalho
> Arquiteto de Sistemas
> [EMAIL PROTECTED]
> www.synos.com.br <http://www.synos.com.br> <http://www.synos.com.br>
>
> "Everything should be made as simple as possible, but not simpler."
> Albert Einstein
>
>

Reply via email to