[Dojo-interest] How to hold a dialog from a form submission
Peter Svensson
psvensson at gmail.com
Fri Jun 13 07:36:17 UTC 2008
You can also create a separate function that you use dojo.connect with, and
then prevent the event from going further;
dojo.connect(dojo.byId('theform'), 'onclick', function(e)
{
e.preventDefault();
....
});
Cheers,
PS
On Fri, Jun 13, 2008 at 9:30 AM, Thomas Wolf <tw at wsf.at> wrote:
> Partogi, Joshua schrieb:
> > Dear all,
> >
> > I wanted to hold a dialog after form submission. This is the code:
> > <form method="POST">
> > <input type="submit" value="Login" class="button"
> > onclick="javascript:submitform()"/>
> > </form>
> >
> > <SCRIPT language="JavaScript">
> > function submitform()
> > {
> > dijit.byId('dialog').show();
> > }
> > </SCRIPT>
> >
> > But unfortunately the dialog is not held as it should be. Can anyone
> > give me a hint on what I've missed here?
> >
>
> Change the onclick function to return 'false', for example:
> onclick="submitform();return(false)"
>
> HTH
> Thomas
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org<http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://turtle.dojotoolkit.org/pipermail/dojo-interest/attachments/20080613/4c9e91e0/attachment.html
More information about the Dojo-interest
mailing list