...

View Full Version : :: opening links from child window in parent window - how?::



babelfish
07-05-2002, 02:39 PM
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

Spookster
07-05-2002, 02:46 PM
This is really a javascript question:

opener.location.href='http://blah.blah.blah'

Flamerule
07-05-2002, 04:52 PM
To do this in html do :
<a href="link url" target="_parent">Search Result N1!!</a>

babelfish
07-05-2002, 04:55 PM
hmmmz - i tried that on html - doesnt work - although spooks does -basically the parent does something with frames in the current window :(

Mrs G
07-08-2002, 07:35 PM
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>

Quiet Storm
07-09-2002, 01:28 AM
There's some info on this thread:

http://codingforums.com/showthread.php?s=&threadid=1593



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum