Web Analytics Made Easy -
StatCounter Close Page - CodingForum

Announcement

Collapse
No announcement yet.

Close Page

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

  • Close Page

    How do you get a javascript that will close a page to work in a page with frames?

    Help!

    David, 14
    Scotland

  • #2
    You can not close a page.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

    Comment


    • #3
      wrong:
      window.close()

      or in frames:
      top.window.close()

      that should work, i haven't doen any JS in AAAGES. its worthwile to note that you can't close a window that you havent opened. if you do try, the user will get a dialogue asking if he wants to close the window
      photoshop too expensive? use the GIMP! www.gimp.org

      Comment


      • #4
        Thanks very much lads

        Comment


        • #5
          Not reccommended, people won't like having a window closed whether they wanted it open in the first place or not. Magically appearing/dissappearing windows are never good.
          David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
          W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

          Comment


          • #6
            Originally posted by whackaxe
            wrong:
            window.close()

            or in frames:
            top.window.close()
            So a window is the same as a page ? Never heard that.

            I always thought that if you had a frameset, that a seperate page was displayed inside each frame. And that there is no such thing as a frame where no page is loaded in, nor can you have a window where no page is loaded in.
            Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

            Comment


            • #7
              well i was assuming he meant window. i mean, why would you close a page? you could always link to about:blank (or whatever it is) or lin kthe frame that you want kept open for the whole page.

              frames are generally bad things though. try not to use them
              photoshop too expensive? use the GIMP! www.gimp.org

              Comment

              Working...
              X