Is it possible to access request parameters in function callback of jquery get
function doSomething() {
var level;
$.get('http://example.com/getLevel', {
'login': user
},
function (resp) {
//any way to access user or assign resp to level here?
level = resp; //does not work here.
});
//at this point level is still undefined.
}
Thanks