here's what i'm trying to do....this is also related to the popup window...

say for example i have a list of name...
1. which when you click name1, a pop up window will open and display contact information...

name1
name2
name3

  1. minimize pop-up window
  2. click on name2....heres where the problem comes...

i wanted to display the name2 contact information on the same pop window but the popup window doesnt display since it is currently "minimized"

or can i display it in a new popup window?

<SCRIPT LANGUAGE="JavaScript">
function winpop(url)
{
window.open(url,'name','height=500,width=580');
}
</script>
</head>

<a href="#" onclick="javascript:winpop('./page2.php?variable2=$variable1');return false;">$variable1</a>

any idea?

    hello!

    window.focus() was what you were looking for.

    look at this example; it contains an openWindow(url) function which will ensure that the window is re-used if possible and will open a new one if necessary.

    focus() brings it up again when minimized.

    tested with IE 6.0 and firefox 1.0.3.

    <html><head><title>Test</title>
    <script type="text/javascript" language="javascript">
    
    var w;
    function openWindow(target)
    {
    	if(w == null || w.closed == true)
    	{
    		w = window.open(target);
    	}
    	else
    	{
    		w.location.href = target;
    		w.focus();
    	}
    }
    </script>
    </head><body>
    <a href="javascript:openWindow('http://www.phpbuilder.com')">phpbuilder</a>
    <a href="javascript:openWindow('http://www.php.net')">php.net</a>
    </body></html>

    ps. the "redface.gif" <img> tag is inserted automatically and should be replaced by the characters : and o

      Write a Reply...