Hi everyone. =)
I need help with a page I'm trying to build. Let's say I have two pages:
[Page #1]
(has three frames)
[Page #2]
(a regular page; opens as a popup)
I want a link in Page #2 to load TWO frames in Page #1. How can I do this? (all I've found are "parent.frame" and "top.frame" tricks, but they're not working...and I think it's because the link I'm clicking on is NOT part of the frameset.)opener.top.frameName.location.href='http://www.webdeveloper.com/forum/archive/index.php/document.htm';Thank you very much for the help! =)
The trick seems to work for the most part...but there's still a few problems:
I forgot to mention that Page #1 has two pages in it. There's a host/main page, and an iFrame (which is inside the host page). It looks like this:
"happy.html" (framed page; called "menu")
|---------|
| [iFrame] | <-iFrame = "subs"
|________|
1) That iFrame is one of the frames I want to change. But when I use this code, it doesn't work:
opener.top.subs.location.href='http://www.webdeveloper.com/forum/archive/index.php/story/part1.html';
2) When I click a link in Page #2 (the popup), I also want to change the color of "happy.html". But when I tried using this code, it didn't work:
opener.top.document.menu.document.bgColor='green';1) opener.top.menu.subs.location.href='http://www.webdeveloper.com/forum/archive/index.php/story/part1.html';
2) opener.top.menu.document.body.style.backgroundColor='green';
Can you now see why it's best to avoid frames?Ah. I was wondering if I needed to do "menu.subs", but I really wasn't sure. Guess I was right! =D
And YES. Frames suck. (xD) But if I have a lot of pages, and I want to create a menu (one that doesn't reload when you open a new page), AND I want to do several tricks (change the background, etc.)...then what are my options?
JavaScript and frames seem to work (despite the ugly code), but what else can I do? Use Flash or something??CSS (<!-- m --><a class="postlink" href="http://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-18,GGGL:en&q=frames+css">http://www.google.com/search?sourceid=n ... frames+css</a><!-- m -->)
I need help with a page I'm trying to build. Let's say I have two pages:
[Page #1]
(has three frames)
[Page #2]
(a regular page; opens as a popup)
I want a link in Page #2 to load TWO frames in Page #1. How can I do this? (all I've found are "parent.frame" and "top.frame" tricks, but they're not working...and I think it's because the link I'm clicking on is NOT part of the frameset.)opener.top.frameName.location.href='http://www.webdeveloper.com/forum/archive/index.php/document.htm';Thank you very much for the help! =)
The trick seems to work for the most part...but there's still a few problems:
I forgot to mention that Page #1 has two pages in it. There's a host/main page, and an iFrame (which is inside the host page). It looks like this:
"happy.html" (framed page; called "menu")
|---------|
| [iFrame] | <-iFrame = "subs"
|________|
1) That iFrame is one of the frames I want to change. But when I use this code, it doesn't work:
opener.top.subs.location.href='http://www.webdeveloper.com/forum/archive/index.php/story/part1.html';
2) When I click a link in Page #2 (the popup), I also want to change the color of "happy.html". But when I tried using this code, it didn't work:
opener.top.document.menu.document.bgColor='green';1) opener.top.menu.subs.location.href='http://www.webdeveloper.com/forum/archive/index.php/story/part1.html';
2) opener.top.menu.document.body.style.backgroundColor='green';
Can you now see why it's best to avoid frames?Ah. I was wondering if I needed to do "menu.subs", but I really wasn't sure. Guess I was right! =D
And YES. Frames suck. (xD) But if I have a lot of pages, and I want to create a menu (one that doesn't reload when you open a new page), AND I want to do several tricks (change the background, etc.)...then what are my options?
JavaScript and frames seem to work (despite the ugly code), but what else can I do? Use Flash or something??CSS (<!-- m --><a class="postlink" href="http://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-18,GGGL:en&q=frames+css">http://www.google.com/search?sourceid=n ... frames+css</a><!-- m -->)