Updated example to use sample input text if window.prompt method is not
available.