diff options
author | Christian Pointner <equinox@helsinki.at> | 2014-09-17 01:15:27 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2014-09-17 01:15:27 (GMT) |
commit | 3efb9cfe36218a85971c6c84811e10371860f4b8 (patch) | |
tree | f7cc90e6a3cad7f2400b264a693e5efc732aaef2 /index.html | |
parent | 83335d60815eb622e82edec9f9c042b036af0b55 (diff) |
auth call now uses typed in password
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -10,9 +10,20 @@ alert("username: " + data.username + "\ntoken: " + data.token ); } + function authError(req, status, error) { + alert(status + ": '" + error + "'") + } + function auth() { - $.get("/authtoken.json", authSuccess, "json"); + $.ajax("/authtoken.json", + { cache: false, + username: $("#username").val(), + password: $("#password").val(), + dataType: "json", + error: authError, + success: authSuccess + }); } $("#loginform").submit(function(event) { |