views:

18

answers:

1

i have an api for users to log in, http://api.example.com/user_login, this is what i need to do:

send the entered password and username to the api and request verifaction using json get a response using json, if successfull create a cookie and redirect to secured area! sorry im a weak javascript program! thanks

A: 

You might want to have a look at the JQuery library:

http://api.jquery.com/jQuery.get/

$.get('ajax/test.html', function(data) {
  $('.result').html(data);
  alert('Load was performed.');
});
JochenJung