SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast oneafrikan's Avatar
    Join Date
    Oct 1999
    Location
    London, Uk
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    open page in new window frame

    Hi there

    I would like to be able to open a new window, and specify a page to load inside a frame, which is in the new window.

    for example -
    open "new" page, and open this "page" into frame "A",
    or something like this:
    open 'content.htm' with 'submitpage.php' inside frame 'rightcontent'.

    Any ideas or suggestions anybody??

    Thanks and regards
    </timber>
    -> www.oneafrikan.com ><-><><-><-><-><-><
    -> www.openboxsoftware.com ><><-><-><-><

  2. #2
    SitePoint Zealot
    Join Date
    Dec 1999
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let me see if I got the idea. Let's say we want to open 'content.htm' with 'submitpage.php' inside frame 'rightcontent':

    <script>
    function myFunction(newwindow,frame){
    var popup = window.open(newwindow,"myWindow");
    popup.rightcontent.location.href=frame;
    }
    </script>

    Therefore links should be:

    <a href="javascript:myFunction('content.htm','submitpage.php')">Click here to open CONTENT with SUBMITPAGE into RIGHTFRAME</a>

    And your content.htm file should be something like this:

    <html>

    <head>
    <title>Content Page</title>
    </head>

    <frameset rows="50%,*">
    <frame name="rightframe" src="">
    <frame name="anotherframe" src="anotherpage.htm">
    </frameset>
    </html>

    Hope that helps

    Oops! I forgot to tell you. Don't forget to remove the space between 'java' and 'script' when you set up the link.
    Last edited by PGA; Jul 22, 2001 at 17:42.


Bookmarks

Posting Permissions

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