Web Analytics Made Easy -
StatCounter window.prompt - CodingForum

Announcement

Collapse
No announcement yet.

window.prompt

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • window.prompt

    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?

    TIA

    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;
    return(true);
    }
    }

  • #2
    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?

    Comment


    • #3
      Do you really need a "reason for withdraw"? If not I'd just use Confirm() instead of Prompt().

      Former ASP Forum Moderator - I'm back!

      If you can teach yourself how to learn, you can learn anything. ;)

      Comment


      • #4
        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.

        Thanks

        Comment


        • #5
          Heheh... I like your response "Upper management thinks they do".

          (italics added by me).

          Former ASP Forum Moderator - I'm back!

          If you can teach yourself how to learn, you can learn anything. ;)

          Comment

          Working...
          X