When one of my forms is submitted a user may be redirected to either of two pages depending on the value entered into a certain field of the form. The redirect is at the users discretion so I use a confirmation box. If the user presses "Ok" they get one page, if they press "Cancel" they get the other page. Unfortunately "Yes" and "No" buttons make more sense than "Ok" and "Cancel" in my case. I have made a new box using dialog
in jQuery's ui library which has "Yes" and "No" buttons and I call it when the form is submitted like this:
$("#myForm").submit(function() {.....
The problem is that it just flashes on the screen and does not give the user enough time to make a choice, unlike a confirm
box which prevents the form from submitting until the user has made a selection.
Is there any way I make the dialog
box halt form submission the same way as a confirm
box does? I can think of some work arounds, but all require me to stop using $("#myForm").submit(function() {.....