Say I have a function that makes an API call which returns a URL - how can I start a download with that link.
So I have the function:
function myF() {
$.ajax{
//Some GET cal
return url
}
}
And then a button:
<button onclick="myF()">some</button>