When your script is running, it blocks the page from doing anything. You can work around this with one of two ways:
var foo = prompt("Give me input");
, which will give you the string that the user enters into a popup box (or null
if they cancel it)