i want to show a dialog while i am waiting for the request…the request opens a new site (same window) … now my problem is it only opens me the dialog but it does not trigger the request!
I use Jquery ui 1.8.7.Here is my code snippet
Into the HTML Head:
<script>
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
$( "#dialog_1" ).dialog({
autoOpen: false,
modal: true,
draggable: false,
resizable: false,
width: 600
});
$( "#opener_1" ).click(function() {
$( "#dialog_1" ).dialog( "open" );
return false;
});
});
</script>
And here my HTML Code
<div class="register_button"><button id="opener_1" type="submit">Send</button></div>
<!-- the submit button does trigger de request to!-->
<div id="dialog_1" title="register">
Please Wait!
</div>
return false in on click will cancel the default operation.
if you want the dialog to be shown until the new page loads you will not get that result, unless you use ajax to submit the form.