SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    reputation consultant ThaVincy's Avatar
    Join Date
    Mar 2003
    Location
    Flanders
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Popup navigation ?

    Hi,

    I'm wondering about something. Is this possible:

    You have a page, say 'home.htm' of 'home.php' and there is a link on it to open a popup window (eg popup.htm). In this popupwindow you'll find a dropdownbox with 15 items in it, used as a menu. Is it possible to make the initial home.htm navigate to page2.htm after selecting it from the dropdownmenu in the popup window?

    In other words, can you control an open window's navigation by clicking on a link in another window? I believe I saw this once, used as a buddy to help you nav on crowded pages.
    ThaVincy | redesigning your image
    Twizted Imagebuilding personal and corporate reputation solutions

  2. #2
    SitePoint Wizard bronze trophy JRMillion's Avatar
    Join Date
    Apr 2004
    Location
    Arlington VA
    Posts
    2,094
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it is possible to control different windows using javascript. This is usually refered to as a "remote control" or something along those lines.

    in the file that pops up you can say like "opener.document.location = 'nextpage.html';". that will change the page in the window that poped up the nav window.
    in js, "opener" refers to the window that created that current window(navigation)...

  3. #3
    SitePoint Enthusiast bind727's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Alberta
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could atempt to use somthing like this.

    window.opener.location = "index2.php";

    on a link

  4. #4
    reputation consultant ThaVincy's Avatar
    Join Date
    Mar 2003
    Location
    Flanders
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about this:


    in startpage:

    <script language='JavaScript'>
    <!--
    function nav_pop()
    {
    window.open('popup.htm','Popup','width=200,height=450,resizable=yes,scrollbars=yes');
    }
    //-->
    </script>


    link on startpage:

    <a href='javascript:nav_pop();'>Nav Popup</a>


    in popupwindow:

    <script language='javascript'>
    <!--
    function redirect_to(where, closewin)
    {
    opener.location= 'http://www.domain.com/' + where;

    if (closewin == 1)
    {
    self.close();
    }
    }
    //-->
    </script>


    and then as a link in the popup:


    <a href='javascript:redirect_to("page2.htm",0)'>Page 2</a>
    ThaVincy | redesigning your image
    Twizted Imagebuilding personal and corporate reputation solutions

  5. #5
    SitePoint Wizard bronze trophy JRMillion's Avatar
    Join Date
    Apr 2004
    Location
    Arlington VA
    Posts
    2,094
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Exactly.

  6. #6
    reputation consultant ThaVincy's Avatar
    Join Date
    Mar 2003
    Location
    Flanders
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, that'll be all on this matter. Thx a lot guys !
    ThaVincy | redesigning your image
    Twizted Imagebuilding personal and corporate reputation solutions

  7. #7
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ::: certified wild guess :::


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
  •