You need to return true or false in the ok function.  Returning true will
close your window.

Felix.



On 12/26/06, Il Neofita <[EMAIL PROTECTED]> wrote:

This is my code, I am wondering how I can close the window on Success

Thx


  Dialog.confirm($('login').innerHTML,
    {windowParameters: {className: "alphacube", width:380, height:170},
    okLabel: "login", cancelLabel: "cancel",
    ok:function(win){
        xhr=new Ajax.Request('/cambia_pwd.php',
        {
                method:'post', asynchronous:true,
                evalScripts:true,
                onLoading:function(request){Element.show('_spinner');},
                onComplete:function(request){Element.hide('_spinner');},
                onSuccess:function(request){ Element.hide
('_spinner');win.closeInfo();},
                on404: function(t) {
                        Element.show('_error');
                        document.getElementById('_error').innerHTML="Verifica
le password e ricordati che la lunghezza minima e 4 caratteri";
                        Element.hide('_spinner');
                        return false;
                },

postBody:'vecchia_pwd='+escape($F('vecchia_pwd'))+'&nuova_pwd='+escape($F('nuova_pwd'))+'&redigit_pwd='+escape($F('redigit_pwd'))

        });
                }
    });



_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com





--
Felix
-------------------------
God put me on earth to accomplish a certain number of things.  Right now,
I'm so far behind, I will never die...
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to