<form method="post" action="/actions/user/auth/" id="authform">
<div class="str">Имя пользователя:
<input name="auth[login]" id="auth_login" type="text"></div>
<div class="str">Пароль:
<input name="auth[password]" id="auth_password" type="password"></div>
<div class="button">
<div style="float:right;"><a href="/user/reg/">Зарегистрироваться</a>
<a href="/user/pass_restore/">Вспомнить пароль</a></div>
<div style="padding-top:3px;"><input type="submit" value="Войти" onclick="go_auth(); return false;"></div>
</div>
</form>
function go_auth() {
$.post("/actions/user/auth/ajax/",
{'auth[login]': $("#auth_login").val(), 'auth[password]': $("#auth_password").val()},
function(data) { if(data!='ok') { window.location = "/user/auth/"+data; } $("#auth_panel").load('/actions/auth_panel/'); }
);
return false;
}