Need simple javascript help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bangman
    Confirmed User
    • Sep 2004
    • 5283

    #1

    Need simple javascript help

    Ok, I have a page that is split into two frames.
    I want to have a link in the top frame, that when clicked, will close itself and leave only the bottom frame.
    How can I do this?
    - David Hall
    ICQ: 312744199
  • psili
    Confirmed User
    • Apr 2003
    • 5526

    #2
    target="_top" ?
    Your post count means nothing.

    Comment

    • bangman
      Confirmed User
      • Sep 2004
      • 5283

      #3
      Originally posted by psili
      target="_top" ?
      Well, I want the user to stay in the same page, I don't want a new window to pop up.
      - David Hall
      ICQ: 312744199

      Comment

      • Tom_PM
        Porn Meister
        • Feb 2005
        • 16443

        #4
        self.close?
        43-922-863 Shut up and play your guitar.

        Comment

        • bangman
          Confirmed User
          • Sep 2004
          • 5283

          #5
          Originally posted by PR_Tom
          self.close?
          Tried that.
          The format would be "<a href="javascript:self.close">link</a>" right?
          - David Hall
          ICQ: 312744199

          Comment

          • Tom_PM
            Porn Meister
            • Feb 2005
            • 16443

            #6
            Or something like an onclick="window.close();" maybe.. that might throw up a warning though.
            If it does, you could fool it by putting onClick="window.opener=self; window.close();"
            43-922-863 Shut up and play your guitar.

            Comment

            • psili
              Confirmed User
              • Apr 2003
              • 5526

              #7
              Originally posted by bangman
              Well, I want the user to stay in the same page, I don't want a new window to pop up.

              a href... target="_top"> just tells the browser to open the link in the outer-most frame of the current window -- basically it opens the link in the entire window eliminating all frames that currently reside in the window (not a new window, that would be target="_blank").

              But I could be misunderstanding what you're talking about, too.
              Your post count means nothing.

              Comment

              • Anothers
                Confirmed User
                • Nov 2001
                • 219

                #8
                you must reload bottom frame

                suppose bottom frame name is "lisa"

                just use something like this <a href="java_script:top.location.href=lisa.location. href;">click me</a>

                just remove _

                sorry i'm too drunk to write it easier

                or just do it like this guy above me said
                Last edited by Anothers; 02-17-2005, 01:50 PM.

                Comment

                • bangman
                  Confirmed User
                  • Sep 2004
                  • 5283

                  #9
                  Thanks guys, appreciate it.
                  - David Hall
                  ICQ: 312744199

                  Comment

                  Working...