Results 1 to 3 of 3

Thread: Close webpage

  1. #1
    Join Date
    Apr 2008
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Close webpage

    I have got this webpage, how can i make it so when i click a link the webpage closes, so if i click on <A href="test.htm">Test</a> it would load test.htm then close the browser?

  2. #2
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    If you don't mind my asking, I'm just curious about why you would want to do this. Seems to me it might be alarming to certain users who may think something crashed in the browser.

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I'd be annoyed if you closed my browser window. Sometimes I'll want to use the back button and go find whatever (like a google search) and look for something else.

    However, in the case that it is a window you opened with javascript, you can just use this:
    onclick="window.close(); return false;"

    But that will probably only work if javascript originally opened the window-- otherwise it'll be restricted.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •