PDA

Click to See Complete Forum and Search --> : Hard one on Frames


dndstef
Nov 13th, 2000, 06:54 AM
I want to know how to do that!

I have my page 1 with no frame
=> Page1.html

AND I have my page 2 divided in 2 horizontal frame
Page2.html
-frameup => Frameup.html
-framedown => The pages I need

When I click on a link in my page 1, i want that link to be call my multiframe page 2, but i want this page in the framedown of page2.html

Is there a way to do that with javascript on anything else?
Or by passing variable values for esch?

Serge
Nov 13th, 2000, 09:04 AM
You don't have to use JavaScript just for that. You can do something like this. For the second page you have to create a page which will hold only Frameset:

Your First Page:

<HTML>
<BODY>

<BR><BR>

<A HREF=Frameset.htm>To the second page</A>

</BODY>
</HTML>


Frameset page:

<HTML>
<FRAMESET ROWS="20%,*" FRAMEBORDER="0" BORDER="false">
<FRAME SRC="TopPage.htm" SCROLLING="auto" name=TopPage>
<FRAME SRC="Page2.htm" SCROLLING="no" name=Page2>
</FRAMESET>

<BODY>

</BODY>
</HTML>


By pressing a link on the first page will bring you to the Page2 on the bottom. If I missuderstood you, then. please, rephrase the question.

dndstef
Nov 13th, 2000, 09:32 AM
Well it's my fault, i didn't explain it well enough.


Let say i have this on the first page (Page1.htm).

<HTML>
<BODY>

<A HREF=Link1.htm>Link 1</A>
<A HREF=Link2.htm>Link 2</A>
<A HREF=Link3.htm>Link 3</A>
<A HREF=Link4.htm>Link 4</A>
<A HREF=Link5.htm>Link 5</A>

</BODY>
</HTML>


And a second page like this (Page2.htm).

<HTML>
<FRAMESET ROWS="20%,*" FRAMEBORDER="0" BORDER="false">
<FRAME SRC="TopPage.htm" SCROLLING="auto" name=TopPage>
<FRAME SRC="MainPage.htm" SCROLLING="no" name=MainPage>
</FRAMESET>

<BODY>

</BODY>
</HTML>


So I need that if I click on either of the five link on Page1.htm
It goes to Page2.htm and load, the page of the link i clicked, in the
frame named MainFrame.

But i don't want to create a frameset for every link i have on the Page1.htm.

Thanks anyway!

Serge
Nov 13th, 2000, 10:05 AM
Ohh I see. So what you gonna have is 3 frames total. One main on the left and the other one split into 2 horizontal frames. In this case you can do something like this:

First Page (should be a frameset too)

<HTML>
<FRAMESET COLS="20%,*" FRAMEBORDER="0" BORDER="false">
<FRAME SRC="MainPage.htm" SCROLLING="auto" name=Main>
<FRAME SRC="Frameset.htm" SCROLLING="no" name=Frameset>
</FRAMESET>

<BODY>

</BODY>
</HTML>



Frameset page:

<HTML>
<FRAMESET ROWS="20%,*" FRAMEBORDER="0" BORDER="false">
<FRAME SRC="TopPage.htm" SCROLLING="auto" name=TopPage>
<FRAME SRC="Page2.htm" SCROLLING="no" name=Page2>
</FRAMESET>

<BODY>

</BODY>
</HTML>



MainPage.htm

<HTML>
</BODY>
<BR><BR>

<!--By specifying the target, the page would be loaded appropriately-->
<A HREF=Link1.htm target=Page2>Link 1</A>
<A HREF=Link2.htm target=Page2>Link 2</A>
<A HREF=Link3.htm target=Page2>Link 3</A>
<A HREF=Link4.htm target=Page2>Link 4</A>
<A HREF=Link5.htm target=Page2>Link 5</A>



Regards,

dndstef
Nov 13th, 2000, 12:23 PM
Well in fact I want 2 different page.
I don't want a page with 3 frame but 2 different page.
That's why I was asking in the first place how to do it with
a javascript or anything else.

It's coz I need 2 pages that i'm unabled to find a solution.

Danial
Nov 19th, 2000, 07:59 PM
Hi dnbstef,
Here is the solution, all you have to do is add the target property, and assign the name of the frame you want to display the link.

Page1.htm

<HTML>
<BODY>

<A HREF=Link1.htm target=MainPage>Link 1</A>
<A HREF=Link2.htm target=MainPage>Link 2</A>
<A HREF=Link3.htm target=MainPage>Link 3</A>
<A HREF=Link4.htm target=MainPage>Link 4</A>
<A HREF=Link5.htm target=MainPage>Link 5</A>

</BODY>
</HTML>



Page2.htm

<HTML>
<FRAMESET ROWS="20%,*" FRAMEBORDER="0" BORDER="false">
<FRAME SRC="TopPage.htm" SCROLLING="auto" name=TopPage>
<FRAME SRC="MainPage.htm" SCROLLING="no" name=MainPage>
</FRAMESET>

<BODY>

</BODY>
</HTML>