How to get value of async JSONP request?
<p>I need to receive a value of JSONP async request. When I assigning "data" to global variable, I receive a empty object. Please, help me.</p>

<p>Now, I my code get </p>

<pre><code>var url = "http://local/main/getEventData/" + event_id;
var script = document.createElement('script');
script.setAttribute('src', url);
document.getElementsByTagName('head')[0].appendChild(script);

var event_data = {};

function callback(data) {
    event_data = data;
}
</code></pre>

<p>and JSONP </p>

<pre><code>callback({name: 'John'})
</code></pre>

<p>PS Request absolutely works and I can display data variable via console.log(data)</p>
