Autoload Page outside of Frameset

Discussion in 'HTML' started by Thomas Schneider, Jun 2, 2005.

  1. Hello NG.

    I have to load a website in a Frameset with 2
    Frames: A top, B bottom.

    Now I want to load a page in Frame B, which
    automatically (with HTML or JavaScript) loads
    another Page outside of the Frameset but in the
    same Window.

    It should have the same function like a hyperlink
    with target="_parent", but I don't want to klick
    on a link for this, it should happen automatically.

    Does anybody know how to do this?

    Thx.

    Thomas
     
    Thomas Schneider, Jun 2, 2005
    #1
    1. Advertising

  2. Also sprach Thomas Schneider:

    > Now I want to load a page in Frame B, which
    > automatically (with HTML or JavaScript) loads
    > another Page outside of the Frameset but in the
    > same Window.


    Meaning that the whole frameset will be gone - so why have it in the first
    place?
    If you want something like "click here to remove frameset", a normal link
    with target="_top" will do.

    > It should have the same function like a hyperlink
    > with target="_parent", but I don't want to klick
    > on a link for this, it should happen automatically.


    You mean like this?
    top.location.href = 'another_page_outside_of_the_frameset.html';
     
    Thomas Mlynarczyk, Jun 2, 2005
    #2
    1. Advertising

  3. Ist Englisch in dieser Newsgroup Pflicht?
    Sonst könnten wir das auch auf deutsch machen.

    Thomas Mlynarczyk schrieb:

    >
    > Meaning that the whole frameset will be gone - so why have it in the first
    > place?
    > If you want something like "click here to remove frameset", a normal link
    > with target="_top" will do.
    >
    >


    I have a web address at 1&1. It is only a kind of forwarding. But they
    do this forwarding by generating a frameset with one frame not visible
    an in die other frame my website. It is because they offer the same
    web address forwarding with ads, which they show then in the upper frame.
    I have the package without ads, but the problem is, if I press refresh
    in my browser when I am on my page, the whole frameset is reloaded and
    die start page of my site appear not the page I was actually at. Also
    problems with bookmarking etc. So I want to generate a page to which
    the 1&1 address is forwarded to, and which then loads my site outside
    the frameset. But this shall happen automatically, not by klicking a
    link


    > You mean like this?
    > top.location.href = 'another_page_outside_of_the_frameset.html';
    >



    I tried to use something like this with onload="" in the body, but
    I must have done sth. wrong, because it didn't work. Can you help
    me with more details!

    Thx

    Thomas
     
    Thomas Schneider, Jun 2, 2005
    #3
  4. Thomas Schneider

    kchayka Guest

    Thomas Schneider wrote:
    >
    > I have a web address at 1&1. It is only a kind of forwarding.
    > I have the package without ads


    Hmmm... If you're paying to remove ads, why don't you spend that money
    on real hosting instead? There are hosting packages for as little as $1
    per month out there, as well as domain name registration for less than
    $10 a year. With those kinds of prices, there's no good reason *not* to
    do it, is there?

    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
     
    kchayka, Jun 2, 2005
    #4
  5. Also sprach Thomas Schneider:

    > Ist Englisch in dieser Newsgroup Pflicht?


    Ja.

    > Sonst könnten wir das auch auf deutsch machen.


    Dafür gibt's z.B. de.comm.infosystems.www.authoring.misc oder andere.

    > I have a web address at 1&1. It is only a kind of forwarding. But they
    > do this forwarding by generating a frameset with one frame not visible


    Ok, now I understand the problem.

    >> top.location.href = 'another_page_outside_of_the_frameset.html';


    I forgot: You must check if the page is not already in the "top", otherwise
    you create an infinite loop. See below.

    > I tried to use something like this with onload="" in the body, but


    You can put it directly in the head. No need to let the user wait until the
    page is loaded.

    > I must have done sth. wrong, because it didn't work. Can you help
    > me with more details!


    Put this in the head of the page which is loaded into the frameset and
    supposed to be outside of it:

    <script type="text/javascript">
    if (top != self) top.location.replace(self.location);
    </script>

    Of course, this will not work if the user has JavaScript disabled. The best
    solution for you would be indeed what kchayka suggests.
     
    Thomas Mlynarczyk, Jun 3, 2005
    #5
  6. kchayka schrieb:

    >
    > Hmmm... If you're paying to remove ads, why don't you spend that money
    > on real hosting instead? There are hosting packages for as little as $1
    > per month out there, as well as domain name registration for less than
    > $10 a year. With those kinds of prices, there's no good reason *not* to
    > do it, is there?
    >


    Done. :)

    Thomas
     
    Thomas Schneider, Jun 8, 2005
    #6
  7. Thomas Mlynarczyk schrieb:

    >
    > Of course, this will not work if the user has JavaScript disabled. The best
    > solution for you would be indeed what kchayka suggests.
    >
    >


    You both are right, I now changed my provider! :)

    Thomas
     
    Thomas Schneider, Jun 8, 2005
    #7
    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. Replies:
    0
    Views:
    692
  2. xzzy
    Replies:
    4
    Views:
    650
  3. ck388
    Replies:
    1
    Views:
    603
    ck388
    Sep 24, 2003
  4. Julius Mong
    Replies:
    1
    Views:
    392
    Randy Webb
    May 10, 2004
  5. J Krugman

    *{$AUTOLOAD} vs *$AUTOLOAD

    J Krugman, Jul 13, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    104
    Tassilo v. Parseval
    Jul 14, 2005
Loading...

Share This Page