nikku / jquery-bootstrap-scripting

A number of jQuery plugins to ease scripting of bootstrap featured pages.
http://nikku.github.com/jquery-bootstrap-scripting
278 stars 49 forks source link

No Reload after (dialog2.closed) #57

Open kevinmeckl opened 12 years ago

kevinmeckl commented 12 years ago

Hi,

the modal will close after the page do not reload, it is possible? the modal box will close as when I click on close.

Thank you...

nikku commented 11 years ago

Could you clarify what your issue is about? A piece of code would help, too!

corpulent commented 11 years ago

@Nikku , what @KevinMkl is saying is that when you open the dialog and submit a form to lets say another page, then close it, the dialog content does not reload back to the original first page. Maybe there should be an option to reload original content of the dialog on dialog2.closed event.

kevinmeckl commented 11 years ago

Yes, after a function I call dialog2.closed event, the window closes but the page is reloaded

$("#form_submit").validationEngine('attach', {
    onValidationComplete: function(form, status){
        //Check Validation
            if (status == true){
                $("#form_submit").submit_function();

                        dialog.trigger("dialog2.closed");
                        dialog.("dialog2.closed");

                       // I try several types

            }
        } 

});
nikku commented 11 years ago

Still can't reproduce. If you can show me a jsfiddle then I could see, whether this is a bug.

Simple form submit won't work anyway as the form must be ajax-submitted.

dragonfly4 commented 11 years ago

I have the same issue and it is indeed via Ajax.

The jsfiddle doens't work but it should give you a better view of the code http://jsfiddle.net/dragonfly4/3EQXS/

You click on "Open dialog", the form opens (view A) and you submit it. (view B) You close view B. Let's say you want to modify your data again so you click again on "open dialog" and then you get view B instead of seeing view A.

Any idea how we can reset the state of the dialog when closing it?