Close current web-page

Discussion in 'HTML' started by cla, Sep 14, 2004.

  1. cla

    cla Guest

    Hi to all,
    In my web page I should put a link that once clicked on close the current page.
    How is it possible in html? If not, is it possible in javascript?


    Thanks
    Cla
    cla, Sep 14, 2004
    #1
    1. Advertising

  2. cla

    rf Guest

    "cla" <> wrote in message
    news:26B1d.2247$...
    > Hi to all,
    > In my web page I should put a link that once clicked on close the current

    page.
    > How is it possible in html? If not, is it possible in javascript?


    No.

    What is wrong with the browsers close button. It works just like all the
    other close buttons in all of the other applications your viewer has.

    --
    Cheers
    Richard.
    rf, Sep 14, 2004
    #2
    1. Advertising

  3. cla

    Karl Groves Guest

    "cla" <> wrote in message
    news:26B1d.2247$...
    > Hi to all,
    > In my web page I should put a link that once clicked on close the current
    > page.
    > How is it possible in html? If not, is it possible in javascript?


    Why do you want to close the user's window?
    What makes you think that they won't want to go to a different site once
    they're done with your site?

    -Karl
    Karl Groves, Sep 14, 2004
    #3
  4. cla

    Neal Guest

    On Tue, 14 Sep 2004 12:03:10 GMT, cla <> wrote:

    > Hi to all,
    > In my web page I should put a link that once clicked on close the
    > current page.
    > How is it possible in html? If not, is it possible in javascript?


    There's only one good reason I can think of to do that and that's if
    you're doing, say, a bank website and closing the browser will end the
    session. Even then, it's better (and more reliable in the end) to tell the
    user to do it manually.

    There is no HTML solution, and no reliable Javascript solution which can
    work for all users.
    Neal, Sep 14, 2004
    #4
  5. On Tue, 14 Sep 2004 12:03:10 +0000, cla wrote:

    > Hi to all,
    > In my web page I should put a link that once clicked on close the current page.
    > How is it possible in html? If not, is it possible in javascript?
    >
    >
    > Thanks
    > Cla


    Not with plain 'ol HTML.

    It is possible with JavaScript. And I'll even tell you how to do it:

    window.close();

    However you'll find that most sensible web designers/developers do not
    like to use this technique, and that most users do not like to have their
    window closed out from under them.

    The only valid time I can imagine this being used is something like:

    <a href="#" onClick="window.close()">Close This Window</a>

    So that a user *action* closes this window. Not something automated.

    However, I have always wondered what the heck is wrong with the window
    manager's own "close" button -- the "X" in the upper-right corner in MS
    Windows windows, or the whatchamajiggie in the upper left of MacOS
    windows, (or, in my case -- KDE on Linux -- the "X" or whatchamajiggie in
    whichever corner *I* decide to put it -- but that'll lead me to a long
    winding diverted tangential conversation about Linux...um, oops, sorry.
    Back to the subject at hand)

    Although I will take my mother as the quintessential non-technical
    computer user. For her, a large, bold, highlighted link "Close This
    Window" is absolutely necessary else she won't remember about the "X" in
    the upper-right corner. Of course, she also thought the CD ROM drive was a
    built in cup holder***.

    --
    Jeffrey D. Silverman | **
    Website | http://www.newtnotes.com

    (** Drop "pants" to reply by email)

    *** Not really. I stole that from off the 'net somewhere.
    Jeffrey Silverman, Sep 14, 2004
    #5
  6. cla

    Karl Groves Guest

    "Jeffrey Silverman" <> wrote in message
    news:p...

    >
    > The only valid time I can imagine this being used is something like:
    >
    > <a href="#" onClick="window.close()">Close This Window</a>


    Oh, a blank fragment identifier? That's cute.

    -Karl
    Karl Groves, Sep 14, 2004
    #6
  7. On Tue, 14 Sep 2004 13:03:56 -0400, Karl Groves wrote:

    > Oh, a blank fragment identifier? That's cute.
    >
    > -Karl


    Huh? What, the pound sign?

    It's just an example.

    --
    Jeffrey D. Silverman | **
    Website | http://www.newtnotes.com

    (** Drop "pants" to reply by email)
    Jeffrey Silverman, Sep 14, 2004
    #7
  8. cla

    Hywel Guest

    In article <>, Jeffrey
    Silverman says...
    > On Tue, 14 Sep 2004 13:03:56 -0400, Karl Groves wrote:
    >
    > > Oh, a blank fragment identifier? That's cute.
    > >
    > > -Karl

    >
    > Huh? What, the pound sign?


    That's a hash. This is a pound sign: £.

    --
    Hywel

    http://sponsorhywel.org.uk/
    Hywel, Sep 14, 2004
    #8
  9. cla

    Neal Guest

    On Tue, 14 Sep 2004 19:52:26 +0100, Hywel <> wrote:

    > In article <>, Jeffrey
    > Silverman says...
    >> On Tue, 14 Sep 2004 13:03:56 -0400, Karl Groves wrote:
    >> > Oh, a blank fragment identifier? That's cute.

    >> Huh? What, the pound sign?

    > That's a hash. This is a pound sign: £.


    # is, in fact, commonly referred to as the "pound sign" in the US,
    regardless of its proper name. Also called the "number sign", the
    "tic-tac-toe thingee" and "that funny-looking thing above the 3". I use it
    to represent a sharp when typing chord symbols like F#m7(b5).

    A rather versatile little guy, that ... what was it called? ;)
    Neal, Sep 14, 2004
    #9
  10. cla

    Chris Beall Guest

    Chris Beall, Sep 14, 2004
    #10
  11. Blinky the Shark, Sep 15, 2004
    #11
  12. cla

    Neal Guest

    On 15 Sep 2004 01:28:38 GMT, Blinky the Shark <> wrote:

    > Third entry:
    >
    > http://catb.org/~esr/jargon/html/A/ASCII.html
    >


    Technically, it cannot be a sharp, as a sharp has the uprights perfectly
    vertical and the thicher crossbars at a slant. It can be used to represent
    one, but it isn't one really. Other than that, great.
    Neal, Sep 15, 2004
    #12
  13. Neal wrote:

    > On 15 Sep 2004 01:28:38 GMT, Blinky the Shark <> wrote:


    >> Third entry:


    >> http://catb.org/~esr/jargon/html/A/ASCII.html


    > Technically, it cannot be a sharp, as a sharp has the uprights perfectly
    > vertical and the thicher crossbars at a slant. It can be used to represent
    > one, but it isn't one really. Other than that, great.


    Oh, c'mon. Did I dispute "octothorpe" just because the namesake Thorpe
    is a lot taller than he is wide, and the height-width aspects of this
    symbol aren't nearly that different? :)

    --
    Blinky Linux Registered User 297263

    Go Blue
    Blinky the Shark, Sep 15, 2004
    #13
  14. cla

    Neal Guest

    On 15 Sep 2004 04:32:13 GMT, Blinky the Shark <> wrote:

    > Neal wrote:
    >> Technically, it cannot be a sharp, as a sharp has the uprights perfectly
    >> vertical and the thicher crossbars at a slant. It can be used to
    >> represent
    >> one, but it isn't one really. Other than that, great.

    >
    > Oh, c'mon. Did I dispute "octothorpe" just because the namesake Thorpe
    > is a lot taller than he is wide, and the height-width aspects of this
    > symbol aren't nearly that different? :)


    Not in writing. But my ESP, well, we'll leave that to guesswork...
    Neal, Sep 15, 2004
    #14
  15. cla

    ...D. Guest

    >On Tue, 14 Sep 2004 12:03:10 GMT, cla <> wrote:
    >> Hi to all,
    >> In my web page I should put a link that once clicked on close the
    >> current page.
    >> How is it possible in html? If not, is it possible in javascript?


    On Tue, 14 Sep 2004 09:12:52 -0400, Neal <> wrote:
    >There's only one good reason I can think of to do that and that's if
    >you're doing, say, a bank website and closing the browser will end the
    >session. Even then, it's better (and more reliable in the end) to tell the
    >user to do it manually.
    >There is no HTML solution, and no reliable Javascript solution which can
    >work for all users.


    Well I can think of another reason. On an website, there is an application
    page that uses HTML. Questions & answer fields.. All links to the website's
    pages are target="_blank", that's just the way the webmaster prefers it. So
    the user fills out the application, and clicks send. OE opens (for me) and
    invites me to send the app. Well, it'd be nice to have the application page
    close so the user is back at the website's main page once they exit OE.



    ...D.
    ...D., Sep 17, 2004
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    2
    Views:
    2,920
  2. Iñaki Baz Castillo
    Replies:
    7
    Views:
    821
    Iñaki Baz Castillo
    Jan 12, 2010
  3. Jack
    Replies:
    3
    Views:
    582
    Tad J McClellan
    Dec 22, 2008
  4. Shang Wenbin

    close current window using window.close()

    Shang Wenbin, Sep 1, 2005, in forum: Javascript
    Replies:
    10
    Views:
    354
    Gérard Talbot
    Sep 2, 2005
  5. Replies:
    3
    Views:
    355
Loading...

Share This Page