Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    England =)
    Posts
    523
    Thanks
    26
    Thanked 0 Times in 0 Posts

    :: opening links from child window in parent window - how?::

    as above...

    i have a popup window with various results from a search and i wanted the links from the search to open up in the main window - is there a way to do this?

    basically to search the user clicks on the search button which opens up a popup frameset - top 1/2 is the input field bottom 1/2 is the results

    thanks
    "They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    This is really a javascript question:

    opener.location.href='http://blah.blah.blah'
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    To do this in html do :
    <a href="link url" target="_parent">Search Result N°1!!</a>
    I don't suffer from insanity, I enjoy every single minute of it!

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    England =)
    Posts
    523
    Thanks
    26
    Thanked 0 Times in 0 Posts
    hmmmz - i tried that on html - doesnt work - although spooks does -basically the parent does something with frames in the current window
    "They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson

  • #5
    New Coder
    Join Date
    Jul 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could try the following


    In the page that opens the popup:

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function newWindow(file,window) {
    msgWindow=open(file,window,'resizable=no,width=200,height=200');
    if (msgWindow.opener == null) msgWindow.opener = self;
    }
    //-->
    </SCRIPT>

    <FORM>
    <INPUT TYPE="button" VALUE="Open New Window" onClick="newWindow('a.html','window2')">
    </FORM>



    In the popup page:

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function load(file,target) {
    if (target != '')
    target.window.location.href = file;
    else
    window.location.href = file;
    }
    //-->
    </SCRIPT>

    <A HREF="javascript:load('b.html',opener)">load document into opener</A>

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There's some info on this thread:

    How to change opener from chromeless
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·


  •  

    Posting Permissions

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