Faab,
нормально всё уходит post
для примера
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.9.1.js'></script>
</head>
<body> <form class="form-horizontal login-form" name="login-form">
<div class="form-group">
<label for="input-username" class="col-lg-2 control-label">Имя</label>
<div class="col-lg-10">
<input name="username" value="name" type="text" class="form-control" id="input-username" placeholder="Имя">
</div>
</div>
<div class="form-group">
<label for="input-password" class="col-lg-2 control-label">Пароль</label>
<div class="col-lg-10">
<input name="password" value="pass" type="password" class="form-control" id="input-password" placeholder="Пароль">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button type="submit" class="btn btn-primary" data-loading-text="Отправляю...">Войти</button>
<span class="help-block error"></span>
</div>
</div>
</form>
<script>
$(document.forms['login-form']).on('submit', function() {
var form = $(this);
$('.error', form).html('');
$(":submit", form).text("loading");
$.ajax({
url: "http://javascript.ru/forum/login.php?do=login",
method: "POST",
data: form.serialize(),
complete: function() {
$(":submit", form).text("reset");
},
statusCode: {
200: function() {
form.html("Вы вошли в сайт").addClass('alert-success');
//window.location.href = "/chat";
},
403: function(jqXHR) {
var error = JSON.parse(jqXHR.responseText);
$('.error', form).html(error.message);
},
404:function(){
alert('Страница не найдена');
}
}
});
return false;
});
</script>
</body>
</html>