Javascript Prompt displaying executed value
<p>I've this code:</p>

<pre><code>&lt;input type="button" value="Test Short URL" onClick="javascript:void(location.href='http://taimoorsultan.com/y/yourls-api.php?signature=05e2685fc7&amp;format=simple&amp;action=shorturl&amp;url='+escape(location.href))&amp;prompt('Shorten URL', 'shorturl');"&gt;
</code></pre>

<p>Actually this code takes url and process it and show a shorten url on next blank page. I was trying to display that shorten url on the same page through prompt().
Using the above code is bit confusing for me. 
How I can process the short url without allowing it to display the result on next page?</p>

<p>I think I should first process the action="" and then do something to show results within a prompt box. But don't know how to do this.
Help please!</p>
