Need to cancel a javascript alert/confirm box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tasha's Dad

    #1

    Need to cancel a javascript alert/confirm box

    A description of the problem:
    1) Go to a page with various settings and a timeout (forces re-login
    if over 10 minutes)
    2) Before the timeout, make some changes to settings.
    3) Press a "reset to defaults" button that uses a confirmation box to
    let the user know what is about to be reset (lists items).
    4) Walk away while the confirm box is displayed and come back after
    the page timeout.
    5) My screen now has the page, a confirm popup on top of that, and a
    timeout alert on top of that.
    6) Press OK to dismiss the timeout alert. The underlying page goes to
    the login screen, but the confirm box remains.

    How can I clear any javascript alert/confirm popups in this situation
    automatically?

    Thanks,
    Barry
  • Tasha's Dad

    #2
    Re: Need to cancel a javascript alert/confirm box

    Anybody?

    Thanks.

    Comment

    • Andrew Thompson

      #3
      Re: Need to cancel a javascript alert/confirm box

      On 8 Nov 2004 07:42:13 -0800, Tasha's Dad wrote:
      [color=blue]
      > Anybody?[/color]

      Rereading your description made my head spin, as it did the
      firt time I read it, how about an URL* instead?
      <http://www.spartanicus .utvinternet.ie/help_us_help_yo u.htm>
      ...advice echoed in my own document..
      <http://www.physci.org/codes/sscce.jsp>

      * An URL paints a thousand words.

      --
      Andrew Thompson
      http://www.PhySci.org/codes/ Web & IT Help
      http://www.PhySci.org/ Open-source software suite
      http://www.1point1C.org/ Science & Technology
      http://www.LensEscapes.com/ Images that escape the mundane

      Comment

      • Tasha's Dad

        #4
        Re: Need to cancel a javascript alert/confirm box

        Sorry, I cannot post a URL. Hopefully, the description will provide
        the details as it is intended.

        Thanks in advance,
        Barry

        Andrew Thompson <SeeMySites@www .invalid> wrote in message news:<ku4kvybpr u8t.1kfa2ux9sj8 hb.dlg@40tude.n et>...[color=blue]
        > On 8 Nov 2004 07:42:13 -0800, Tasha's Dad wrote:
        >[color=green]
        > > Anybody?[/color]
        >
        > Rereading your description made my head spin, as it did the
        > firt time I read it, how about an URL* instead?
        > <http://www.spartanicus .utvinternet.ie/help_us_help_yo u.htm>
        > ..advice echoed in my own document..
        > <http://www.physci.org/codes/sscce.jsp>
        >
        > * An URL paints a thousand words.[/color]

        Comment

        • Andrew Thompson

          #5
          Re: Need to cancel a javascript alert/confirm box

          On 8 Nov 2004 11:27:06 -0800, Tasha's Dad wrote:
          [color=blue]
          > Sorry, I cannot ..[/color]

          * cannot?
          [color=blue]
          >..post a URL.[/color]

          So you mean 'cannot', as in, ..
          a) "someone will shoot me dead if I do"?
          ...or, perhaps more, ..
          b) "I could not be bothered going to all that effort"?

          ( And please refrain from top-posting, that hardly encourages
          the most helpful people on this group to respond to your problem. )

          --
          Andrew Thompson
          http://www.PhySci.org/codes/ Web & IT Help
          http://www.PhySci.org/ Open-source software suite
          http://www.1point1C.org/ Science & Technology
          http://www.LensEscapes.com/ Images that escape the mundane

          Comment

          • kaeli

            #6
            Re: Need to cancel a javascript alert/confirm box

            In article <7b756057.04110 81127.48fbb1ab@ posting.google. com>, barry-
            news@sripd.com enlightened us with...[color=blue]
            > Sorry, I cannot post a URL. Hopefully, the description will provide
            > the details as it is intended.
            >[/color]

            Obviously it didn't or one of us would have answered it by now.
            Make a sample and post it to geocities. There is no valid reason for not
            having a URL. Only excuses.

            You want people to help you, you have to help them help you.

            --
            --
            ~kaeli~
            With her marriage, she got a new name and a dress.



            Comment

            • Tasha's Dad

              #7
              Re: Need to cancel a javascript alert/confirm box

              To simplify the question, if I open a javascript alert with

              alert('Hi how are you, thanks for helping.');

              I need a way to cancel the alert. How can I kill the alert? Is there
              something like javascript.aler t.cancel()?
              [color=blue]
              > Andrew wrote:[/color]

              Hi Andrew.
              [color=blue]
              > So you mean 'cannot', as in, ..
              > a) "someone will shoot me dead if I do"?[/color]

              Yes, exactly.
              [color=blue]
              > ..or, perhaps more, ..
              > b) "I could not be bothered going to all that effort"?[/color]

              Also a little true. This is part of an embedded application. It
              requires scripts to execute properly. Geocities last I knew won't
              allow you to run perl scripts or executables.

              Thanks folks. If I have a chance to strip it down to the bare
              minimum, I'll post a link. Hopefully, the simplified question will
              help. Usually folks want all the details, so that's how I started.

              Barry

              Comment

              • kaeli

                #8
                Re: Need to cancel a javascript alert/confirm box

                In article <7b756057.04110 90457.6af8ba40@ posting.google. com>, barry-
                news@sripd.com enlightened us with...[color=blue]
                > To simplify the question, if I open a javascript alert with
                >
                > alert('Hi how are you, thanks for helping.');
                >
                > I need a way to cancel the alert. How can I kill the alert? Is there
                > something like javascript.aler t.cancel()?[/color]

                Ah. I see.

                Nope, there isn't.

                You may want to reconsider using "real" alerts to notify your users if this
                is a frequent problem. You can simulate an alert with a floating div and an
                onclick handler.
                In fact, you have to kill the whole web browser session if you do something
                stupid like accidentally put an alert in a non-terminating loop. Not that
                I've ever done that while debugging or anything. ;)

                Out of curiosity, what's the problem with the user just clicking YES on the
                confirm to dismiss it? After all, they walked away...

                --
                --
                ~kaeli~
                "No matter what happens, somebody will find a way to take
                it too seriously."



                Comment

                Working...