Web Analytics Made Easy -
StatCounter :: opening links from child window in parent window - how?:: - CodingForum

Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    This is really a javascript question:

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

    Comment


    • #3
      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!

      Comment


      • #4
        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

        Comment


        • #5
          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>

          Comment


          • #6
            There's some info on this thread:

            http://codingforum.net/showthread.php?s=&threadid=1593
            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!·

            Comment

            Working...
            X