html frame

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

    html frame

    Hi,

    how do I switch of frames?
    I have 2 frames on a page. When I click a specific reference I want that
    page to load in the same browserwindow without frames. How? What happens now
    is that the page is loaded in one of the frames.

    Thanx

    Frank


  • David Dorward

    #2
    Re: html frame

    Frank wrote:
    [color=blue]
    > I have 2 frames on a page.[/color]

    Oh dear: http://david.us-lot.org/www/frames/
    [color=blue]
    > When I click a specific reference I want that page to load in the same
    > browserwindow without frames.[/color]

    That has nothing to do with JavaScript.




    --
    David Dorward http://david.us-lot.org/
    Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
    it'll stop pop-up ads? -- Dork Tower

    Comment

    • Philip Ronan

      #3
      Re: html frame

      On 03.8.3 5:19 PM, Frank wrote:
      [color=blue]
      > This seems to work:
      >
      >
      > <script language="JavaS cript"><!--
      > if (self != top)
      > {
      > if (document.image s)
      > top.location.re place(window.lo cation.href);
      > else
      > top.location.hr ef = window.location .href;
      > }
      > // --></script>[/color]

      What?? You don't need Javascript to do this. Just add 'target="_top"' to the
      link.

      <A href="blah.html " target="_top">

      (Although as David mentioned, you're probably better off without frames)

      Phil

      --
      Philip Ronan
      phil.ronanzzz@v irgin.net
      (Please remove the "z"s if replying by email)


      Comment

      • Frank

        #4
        Re: html frame


        "Philip Ronan" <phil.ronanzzz@ virgin.net> wrote in message
        news:BB52F873.1 7615%phil.ronan zzz@virgin.net. ..[color=blue]
        > On 03.8.3 5:19 PM, Frank wrote:
        >[color=green]
        > > This seems to work:
        > >
        > >
        > > <script language="JavaS cript"><!--
        > > if (self != top)
        > > {
        > > if (document.image s)
        > > top.location.re place(window.lo cation.href);
        > > else
        > > top.location.hr ef = window.location .href;
        > > }
        > > // --></script>[/color]
        >
        > What?? You don't need Javascript to do this. Just add 'target="_top"' to[/color]
        the[color=blue]
        > link.
        >
        > <A href="blah.html " target="_top">
        >
        > (Although as David mentioned, you're probably better off without frames)
        >
        > Phil
        >
        > --
        > Philip Ronan
        > phil.ronanzzz@v irgin.net
        > (Please remove the "z"s if replying by email)
        >[/color]


        Maybe this works but I would have to put it in every href. The javascript I
        only have to put once in the called html file.
        Frank


        Comment

        • David Dorward

          #5
          Re: html frame

          Frank wrote:
          [color=blue]
          > Maybe this works but I would have to put it in every href.[/color]

          There's this clever little thing called search and replace.
          [color=blue]
          > The javascript I only have to put once in the called html file.[/color]

          And not have it work for those users who turn off JS, and to have it load a
          page twice for at least some of those who do.

          Not using frames in the first place is easier of course.

          --
          David Dorward http://david.us-lot.org/
          Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
          it'll stop pop-up ads? -- Dork Tower

          Comment

          • Evertjan.

            #6
            Re: html frame

            Frank wrote on 03 aug 2003 in comp.lang.javas cript:[color=blue]
            > Maybe this works but I would have to put it in every href. The
            > javascript I only have to put once in the called html file.[/color]

            Solution, put in the <head>:

            <base target="_top">

            --
            Evertjan.
            The Netherlands.
            (Please change the x'es to dots in my emailaddress)

            Comment

            Working...