Javascript: Show Throbber during long-running javascript function
<p>When the user clicks a button on my webpage, I call a long-running JavaScript function (e.g. the pausecomp function found here: <a href="http://www.sean.co.uk/a/webdesign/javascriptdelay.shtm" rel="nofollow">http://www.sean.co.uk/a/webdesign/javascriptdelay.shtm</a>)</p>

<p>The browser freezes while waiting for the function call to finish. How can I make the function run asynchronously? How can I show a throbber while it's running and hide the throbber when it's finished?</p>

<p>All examples I've found all assume you are using AJAX. Is there a more generic way to do this for any function call?</p>
