Closed Thread Icon

Topic awaiting preservation: frames & linking (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8496" title="Pages that link to Topic awaiting preservation: frames &amp;amp; linking (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: frames &amp; linking <span class="small">(Page 1 of 1)</span>\

 
slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 01-28-2003 18:15

I got a 3-frames page. 1 of them is the menu. When I click a link on the menu, I want the pages in both of the other two frames to change. I don't have a problem with changing the content of one of the frames but changing both the contents on clicking one link has got me stumped.

let's just say the names of the three frames are "menu", "frameTwo" and "frameThree".

Archonian
Nervous Wreck (II) Inmate

From: Sweden, Malmoe
Insane since: Jan 2003

posted posted 01-28-2003 18:50

try to make a function that goes something like:

function loadPages(p1,p2) {
parent.frameTwo.location.href = p1;
parent.frameThree.location.href = p2;
}

and on the menu item:
<a href="javascript:{loadPages('page1.html','page2.html');}">Link</a>

I'm not totally sure that it works but try it.

slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 01-28-2003 19:24

didn't work. please help.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 01-28-2003 20:53

Almost right

code:
function loadPages(p1,p2) {
parent.frameTwo.location.href = p1;
parent.frameThree.location.href = p2;
}

needs to be changed to:

function loadPages(p1,p2) {
parent.frames["frameTwo"].location = p1;
parent.frames["frameThree"].location = p2;
}



And it should work.
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 01-28-2003 21:55

DMS, thanx, it worked!

Archonian, thanx for trying.

Archonian
Nervous Wreck (II) Inmate

From: Sweden, Malmoe
Insane since: Jan 2003

posted posted 01-29-2003 10:02

No Problem =)

Coconut
Nervous Wreck (II) Inmate

From:
Insane since: Jul 2002

posted posted 02-05-2003 17:29

could you that if you want to open up three pages with one link? like

function loadPages(p1,p2,p3)

etc.!?

Archonian
Nervous Wreck (II) Inmate

From: Sweden, Malmoe
Insane since: Jan 2003

posted posted 02-05-2003 21:10

Yup!

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-05-2003 21:22

I'd suspect that

function loadPages(p1,p2) {
parent.frames.frameTwo.location = p1;
parent.frames.frameThree.location = p2;
}

Would be an even better solution. =)

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 02-06-2003 09:21

:P
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

« BackwardsOnwards »

Show Forum Drop Down Menu