What do you expect to happen when your visitor checks the checkbox to turn off JavaScript (as you can see appears in some browsers as shown above - since prompt is intended for debugging use only)? If that is selected then no value gets returned from the prompt. You'd do better to use a form in the web page if you want visitors to be able to enter something.