Autoload Page outside of Frameset

  • Thread starter Thomas Schneider
  • Start date
T

Thomas Schneider

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
 
T

Thomas Mlynarczyk

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';
 
T

Thomas Schneider

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

Thomas said:
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
 
K

kchayka

Thomas said:
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?
 
T

Thomas Mlynarczyk

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.

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.
 
T

Thomas Schneider

kchayka said:
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
 
T

Thomas Schneider

Thomas said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top