Odd error from javascript prompt() function in Chrome browser:
Reported by
dcb...@gmail.com,
May 12 2016
|
||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Steps to reproduce the problem:
1. A javascript function --
function testprompt() {var pw=prompt("Enter password:" ,"");}
2. Called from a .php page being tested on WIndows7 localhost (IIS).
3. When the .php file has parameters, such as --
http://localhost/index.php?ws=0
4. An error is seen in the Chrome debugger --
script.js:41 Uncaught TypeError: prompt is not a function
5. Yet when the same .php is loaded without parameters --
http://localhost/index.php
6. There is no error.
7. Also no error, with or without parameters, when run on a remote (Apache) server.
8 No error in Firefox or IE11 browsers.
Any clue what gives?
What is the expected behavior?
window.prompt() should work. it fails only in a .php file on Windows 7 localhost where the .php was passed a parameter.
What went wrong?
window.prompt() in javascript code throws error "Uncaught TypeError: prompt is not a function" seen in Chrome debugger
Did this work before? N/A
Chrome version: 50.0.2661.102 Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 21.0 r0
code works in Firefox and IE 11.
,
Jun 27 2016
Closing the issue as there is no user update on this for long. Feel free to file a new issue with the required information provided in the comment #1 if this still seen on any of the latest chrome versions. |
||
►
Sign in to add a comment |
||
Comment 1 by yhirano@chromium.org
, May 13 2016Labels: Needs-Feedback