I\'m calling a Javascript window.prompt() and prompting the user to submit a variable which I compare to another variable (a very basic password protection). Th
One substantial problem with handling the result of 'prompt' is that Safari (at least version 9.1.2) returns "" instead of null when "Cancel" is clicked. This means that: if(result==null) return; does not work, and you cannot distinguish between entry of a null string, and cancellation.