ignore that, better:

function initSigninForm() {
    var options = {
        target: '#mainContent',
        dataType: 'json',
        beforeSubmit: showRequest,
        success: showSignInResponse
    }
    $('#mainContent form').ajaxForm(options);
}
function showSignInResponse(xhr) {
    if (xhr.error_msg != 'No error') {
        $('#mainContent').html(xhr.content_html,
showNewContent(xhr.message, xhr.response_filepath, xhr.key));
        xhrErrorDisplay(xhr);
    } else {
        xhrResponseDisplay(xhr);
        $('#mainContent').html(xhr.content_html,
showNewContent(xhr.message, xhr.response_filepath, xhr.key));
        initSigninForm();
    }
}

Reply via email to