Hi all.

I ask for some help/advise.

I have a jquery form dialog to collect usr/pwd in order to do a ftp login.

I have the form working and the dialog is showing me the correct values for the fields but the dialog I have is not working (I am newbie with jquery) nothing happens. My guess is the .ajax but I cannot be sure.

Here is the code I have:

Code:
$(function(){
    $('#ftp').dialog({
        autoOpen: false,
        show: 'highlight',
        hide: 'scale',
        modal: true,
        buttons: {
            'send': function() {
                var name = $('#usr').val(), password = $('#pwd').val();
                var myftp = $(this);

                if (name != '' && password != '') { // alert('name=' + name + '&pass=' + password);
                    $.ajax({
                      type: 'POST',
                      url: 'ftp.php',
                      data: 'name='+name+'&pass='+password,
                      success: function(msg){
                        alert(msg);
                        $(myftp).dialog('close');
                      }
                    });
                }
            },
            'close': function() { $(this).dialog('close'); }
        },
        resizable: false,
        width: '500px'
    });
ftp.php is a simple header ('location: ... ) to call the ftp with the proper parameters.

#ftp is the form id containing usr/pwd.

I don't know if jquery has the equivalent functionality. I am more familiar with php

I really appreciate your help with this.

Regards,