View Full Version : window.prompt

06-20-2002, 04:49 PM
I have a piece of code that checks a form and has a prompt that passes back information if submitted to continue in the process. The problem is that the prompt box flashes and then disappears and I can't access it. It is as if the cancel button is being it. Any ideas?


if (theForm.asset_status_cd.options[theForm.asset_status_cd.selectedIndex].value=="WFD")
var theResponse = window.prompt("Choosing this status code will close all requests, are you sure you want to do this? Input space provided for reason of withdraw.","");

if ((theResponse != "") && (theResponse != null))
theForm.myreason.value = theResponse;

06-20-2002, 05:42 PM
it works on the actual site on three other machines here, but one is IE 6 and one is IE 5.0 and one is Netscape 6.2; my machine is IE 5.5, maybe a browser issue?

06-21-2002, 01:10 AM
Do you really need a "reason for withdraw"? If not I'd just use Confirm() instead of Prompt().


06-21-2002, 02:57 PM
I don't need the reason, upper management thinks they do. I found that the problem was a popup killer I was running on my machine. Somehow that popup window was in my blacklist and everytime it came up the killer would close it. When I disable the killer it works like a champ.


06-22-2002, 02:13 AM
Heheh... I like your response "Upper management thinks they do".

(italics added by me).