loading page in preexisting window

liunx

Guest
Looking for a simple way to load link to another page and have the target be a different, already pre-existing window.<br />
<br />
I know it's trivial to simply open a new window or to target a frame in the same window, but I wish to use a different window that I know will already be open. One other thing; can the originating window be made to close itself at the same time?<br />
<br />
TIA!<!--content-->Your going to do what with the what? Ok you want a spalsh screen like a loding page right? Then you want your main page to open in a new window and the spalsh screen to close its self right? Or am I not even in the ball park of understanding what you are asking.<!--content-->Sorry if I haven't explained well!<br />
<br />
Here's the deal:<br />
1) from homepage (A), user clicks link and gets small, new pop-up window (B).<br />
<br />
2) new window (B) - apart from its content - has link to different part of the site, which I'd like to open in the window in which the homepage currently resides (A).<br />
<br />
3) ideally, I'd also like the new window (B) to close itself at the same time<br />
<br />
Make more sense?<!--content-->Yea. You are going to need a way to communicate between your windows. Its going to involve java script and its going to be pretty complex. I am thinking it will be a lot like communicationg between frames, but I dont know exactly how you are going to do what you want to exactly. This will be pretty tough to do, I am drawing blanks. Why dont you post this over in the java script forum. It is defianty possible with php because I have seen things where it puts data in a text box from anoherwindow but I just can;t think of how to do it client side.<!--content-->You are going to need some javascript to do this. Try coding your popup page something like this...<br />
<br />
<html><br />
<head><br />
<script language="javascript" type="text/javascript"><br />
function openpage(ref)<br />
{<br />
window.opener.location = ref;<br />
}<br />
</script><br />
</head><br />
<body><br />
Your Content Here.<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"yourpage.htm" onClick="openpage(this.href); return false;">Open page in main window</a><br />
</body><br />
</html><!--content-->pyro wrote:<br />
Try coding your popup page something like this...<br />
<br />
Beautiful - this works great!<br />
<br />
One last thing - <br />
Is there anyway to append a onClick="self.close()" to this so the pop-up will close itself as the other page loads? <br />
<br />
Thanks again!<!--content-->Ah, yes. Forgot you wanted that....<br />
<br />
<html><br />
<head><br />
<script language="javascript" type="text/javascript"><br />
function openpage(ref)<br />
{<br />
window.opener.location = ref;<br />
window.close();<br />
}<br />
</script><br />
</head><br />
<body><br />
Your Content Here.<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"yourpage.htm" onClick="openpage(this.href); return false;">Open page in main window</a><br />
</body><br />
</html><!--content-->Ah, yes. Forgot you wanted that.... <br />
<br />
Wow - that was fast!<br />
<br />
Again, that works beautifully!<br />
Thanks for making my day!<!--content-->
 
Back
Top