[jQuery] function to return value from ajax

[jQuery] function to return value from ajax


Is it possible to make a function that returns a value from an ajax
request. I want the javascript execution to stop until the function
returns it's value. Inside the function it makes it's ajax request
then returns a value based on the data returned. Currently I only see
that a callback function is called.