Closing a window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Partin

    Closing a window

    I am creating HTML documents that have the same structure as shown
    below. As a convenience to the user, I wanted to simply put a button
    on the bottom of the page to close the window. However, since the
    window is not created by a script, the onclick command does not work.
    These files are simply meant to be clicked on by the user and
    displayed in their browser of choice. Any suggestions?

    Kevin Partin

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html">
    <title>Eigenval ue Summary Table</title>
    <style type="text/css">
    <!--

    h1 {
    font-family: arial,helvetica ,sans-serif;
    font-size: large;
    font-weight: bold;
    text-align: center;
    }

    subtitle {
    font-family: arial,helvetica ,sans-serif;
    font-size:small;
    font-weight: bold;
    text-align: center;
    }

    * {
    font-family: courier new,courier,mon ospace;
    }

    -->
    </style>
    </head>
    <body>
    <h1>Real Eigenvalue Summary Table</h1>
    <table border="1" cellspacing="0" align="center"
    style="width: 80%; text-align: right;"
    title="Real Eigenvalue Summary Table" cols="4">
    <tbody>
    <tr style="text-align: center;">
    <td style="font-family: arial,helvetica ,sans-serif;">Mode</td>
    <td style="font-family:
    arial,helvetica ,sans-serif;">Eigenva lue</td>
    <td style="font-family:
    arial,helvetica ,sans-serif;">Radians </td>
    <td style="font-family: arial,helvetica ,sans-serif;">Cycles</td>
    </tr>
    <tr>
    <td>1</td>
    <td>2.0</td>
    <td>2.0</td>
    <td>2.0</td>
    </tr>
    </tbody>
    </table>
    <hr align="left" noshade size="1px" width="100%">
    <form style="text-align: center;">
    <input type="button" value="Close"
    onclick="window .close()" style="font-family:
    arial,helvetica ,sans-serif;">
    </form>
    </body>
    </html>
  • Mick White

    #2
    Re: Closing a window

    Kevin Partin wrote:
    [color=blue]
    > I am creating HTML documents that have the same structure as shown
    > below. As a convenience to the user, I wanted to simply put a button
    > on the bottom of the page to close the window. However, since the
    > window is not created by a script, the onclick command does not work.
    > These files are simply meant to be clicked on by the user and
    > displayed in their browser of choice. Any suggestions?[/color]
    [color=blue]
    > <input type="button" value="Close"
    > onclick="window .close()" style="font-family:
    > arial,helvetica ,sans-serif;">[/color]

    Personally, I would learn to come to grips with the "limitation s" of
    javascript.
    The reason that browsers are reluctant to close the main window is that
    is a poor ui technique, and it often leaves the user confused.
    Mick

    Comment

    • Michael Winter

      #3
      Re: Closing a window

      On 6 May 2004 08:16:44 -0700, Kevin Partin
      <Kevin.S.Partin @Alumni.UTexas. net> wrote:
      [color=blue]
      > I am creating HTML documents that have the same structure as shown
      > below. As a convenience to the user, I wanted to simply put a button
      > on the bottom of the page to close the window. However, since the
      > window is not created by a script, the onclick command does not work.
      > These files are simply meant to be clicked on by the user and
      > displayed in their browser of choice. Any suggestions?[/color]

      Please read the FAQ, especially:

      <URL:http://jibbering.com/faq/#FAQ4_14>

      [snip]

      Mike

      --
      Michael Winter
      M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

      Comment

      • Randy Webb

        #4
        Re: Closing a window

        Michael Winter wrote:
        [color=blue]
        > On 6 May 2004 08:16:44 -0700, Kevin Partin
        > <Kevin.S.Partin @Alumni.UTexas. net> wrote:
        >[color=green]
        >> I am creating HTML documents that have the same structure as shown
        >> below. As a convenience to the user, I wanted to simply put a button
        >> on the bottom of the page to close the window. However, since the
        >> window is not created by a script, the onclick command does not work.
        >> These files are simply meant to be clicked on by the user and
        >> displayed in their browser of choice. Any suggestions?[/color]
        >
        >
        > Please read the FAQ, especially:
        >
        > <URL:http://jibbering.com/faq/#FAQ4_14>[/color]

        And then know that it is technically incorrect close to 90% of the time?

        No, I don't want to get into a debate about whether I can/should close a
        window. Its bad design, but it doesn't change the truth.


        --
        Randy
        Chance Favors The Prepared Mind
        comp.lang.javas cript FAQ - http://jibbering.com/faq/

        Comment

        • Mick White

          #5
          Re: Closing a window

          Michael Winter wrote:
          [color=blue]
          > On 6 May 2004 08:16:44 -0700, Kevin Partin
          > <Kevin.S.Partin @Alumni.UTexas. net> wrote:
          >[color=green]
          >> I am creating HTML documents that have the same structure as shown
          >> below. As a convenience to the user, I wanted to simply put a button
          >> on the bottom of the page to close the window. However, since the
          >> window is not created by a script, the onclick command does not work.
          >> These files are simply meant to be clicked on by the user and
          >> displayed in their browser of choice. Any suggestions?[/color]
          >
          >
          > Please read the FAQ, especially:
          >
          > <URL:http://jibbering.com/faq/#FAQ4_14>
          >
          > [snip]
          >
          > Mike
          >[/color]
          Some browsers will close the window under some circumstances, the FAQ
          fails to address the consequences of closing the main window, rather the
          FAQ categorically states that it is not possible.
          Mick

          Comment

          • Michael Winter

            #6
            Re: Closing a window

            On Thu, 06 May 2004 16:13:41 GMT, Mick White
            <mwhite13@BOGUS rochester.rr.co m> wrote:

            [snip]
            [color=blue]
            > Some browsers will close the window under some circumstances, the FAQ
            > fails to address the consequences of closing the main window, rather the
            > FAQ categorically states that it is not possible.[/color]

            I realise that (I know the hack), but what exactly is the point in
            relaying the existance of a browser flaw to achieve something that
            shouldn't be attempted anyway? Particularly if it doesn't work with all
            browsers.

            Closing the window via a link or button doesn't provide convenience, just
            an alternative way to do something that you could already do three other
            ways. Users know about the button in the title bar (that is, the X in
            Windows and KDE). Most will know about an exit option in the File menu.
            Some will also know about the Alt+F4 keystroke. An application specific
            way is not expected and completely unnecessary. Why encourage it?

            Mike

            --
            Michael Winter
            M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

            Comment

            • Mick White

              #7
              Re: Closing a window

              Michael Winter wrote:
              [color=blue]
              > On Thu, 06 May 2004 16:13:41 GMT, Mick White
              > <mwhite13@BOGUS rochester.rr.co m> wrote:
              >
              > [snip]
              >[color=green]
              >> Some browsers will close the window under some circumstances, the FAQ
              >> fails to address the consequences of closing the main window, rather
              >> the FAQ categorically states that it is not possible.[/color]
              >
              >
              > I realise that (I know the hack), but what exactly is the point in
              > relaying the existance of a browser flaw to achieve something that
              > shouldn't be attempted anyway? Particularly if it doesn't work with all
              > browsers.
              >
              > Closing the window via a link or button doesn't provide convenience,
              > just an alternative way to do something that you could already do three
              > other ways. Users know about the button in the title bar (that is, the X
              > in Windows and KDE). Most will know about an exit option in the File
              > menu. Some will also know about the Alt+F4 keystroke. An application
              > specific way is not expected and completely unnecessary. Why encourage it?
              >
              > Mike
              >[/color]

              I agree with your sentiments entirely, I just have a problem with
              "impossible ". It may be better to acknowledge that it can be done, for
              the sake of truth, if nothing else.
              Mick

              Comment

              • Randy Webb

                #8
                Re: Closing a window

                Mick White wrote:[color=blue]
                > Michael Winter wrote:
                >[color=green]
                >> On Thu, 06 May 2004 16:13:41 GMT, Mick White
                >> <mwhite13@BOGUS rochester.rr.co m> wrote:
                >>
                >> [snip]
                >>[color=darkred]
                >>> Some browsers will close the window under some circumstances, the FAQ
                >>> fails to address the consequences of closing the main window, rather
                >>> the FAQ categorically states that it is not possible.[/color]
                >>
                >>
                >>
                >> I realise that (I know the hack), but what exactly is the point in
                >> relaying the existance of a browser flaw to achieve something that
                >> shouldn't be attempted anyway? Particularly if it doesn't work with
                >> all browsers.
                >>
                >> Closing the window via a link or button doesn't provide convenience,
                >> just an alternative way to do something that you could already do
                >> three other ways. Users know about the button in the title bar (that
                >> is, the X in Windows and KDE). Most will know about an exit option in
                >> the File menu. Some will also know about the Alt+F4 keystroke. An
                >> application specific way is not expected and completely unnecessary.
                >> Why encourage it?
                >>
                >> Mike
                >>[/color]
                >
                > I agree with your sentiments entirely, I just have a problem with
                > "impossible ". It may be better to acknowledge that it can be done, for
                > the sake of truth, if nothing else.[/color]


                I stopped posting the "hack" and even the path to get to it via google
                (search the archives for "unconditio nal truth" and you will find it),
                not because I got tired of it, but because I got tired of the "you
                shouldn't do that" argument. No, you shouldn't, but it doesn't change
                the fact that more and more browsers are implementing this "bug" (Yes,
                its a bug). But its hard to call/believe something is a bug when its so
                prevelant.

                --
                Randy
                Chance Favors The Prepared Mind
                comp.lang.javas cript FAQ - http://jibbering.com/faq/

                Comment

                Working...