Results 1 to 6 of 6

Thread: Hard one on Frames

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    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?

    If possible please provide codes.
    Process by example is the best way to learn.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    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:
    Code:
    <HTML>
    <BODY>
    
    <BR><BR>
    
    <A HREF=Frameset.htm>To the second page</A>
    
    </BODY>
    </HTML>
    Frameset page:
    Code:
    <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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    Well it's my fault, i didn't explain it well enough.


    Let say i have this on the first page (Page1.htm).
    Code:
    <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).
    Code:
    <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!



    If possible please provide codes.
    Process by example is the best way to learn.

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    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)
    Code:
    <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:
    Code:
    <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
    Code:
    <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,

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67
    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.
    If possible please provide codes.
    Process by example is the best way to learn.

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    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
    Code:
    <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
    Code:
    <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>
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width