JavaScript
Popup Link Targets Main Window & Auto Closes Popup
This is a very useful script. Often times you'll need to open a link from your little popup window into the main full size window. That's cool, but it's kinda tacky leaving the popup active. Using this scrip when a user clicks on a link in the popup window the page opens in the main (parent) window and the popup auto-closes. Very Nice!
Copy and Paste:

This Goes In Main Page

<script language="JavaScript"><!--
function popwin(url) {
popup = window.open('yourpopup.html','windowName','width=500,height=400');
if (!popup.opener)
    popup.opener = self;
        }
//--></script>

 <a href="javascript:popwin('yourpopup.html');">

This goes in your popup window:

<script language="JavaScript"><!--
function supressError() {
    return true;
}

function load(url) {
    window.onerror = supressError;
    opener.location.href = url;
    setTimeout('self.close()',1000);
}
//--></script>

<a href="javascript:load('http://www.datacreek.com')">text link</a>


Close Window


html~Creek