I try to open pop up in the same window, but it forwards me to another. Also, I try to refresh window after pop up closes, but I don't find easy solution. I think the best is not to put # to the URL. That is my function:\[code\]<li value="http://stackoverflow.com/questions/10552340/Open window" > <a href="javascript: window.open('upd.php?m=<?php echo $oldpar?>','','width=520,height=400')"> <u>EDIT</u> </a></li>\[/code\]I manage open the window, however main page also goes to \[code\]javascript: window.open('upd.php?m=2','','width=520,height=400')\[/code\]. I tried to put:\[code\]<script type="text/javascript"> <!-- function refreshParent() { window.opener.location.href = http://stackoverflow.com/questions/10552340/window.opener.location.href; if (window.opener.progressWindow) { window.opener.progressWindow.close() } window.close(); } //--></script>\[/code\]It would be great to close pop up automatically after user select variables and press button. Immediately after the parent(main) URL would refresh.. Any help? P.s. any ideas how to auto refresh pop up? I saw all browsers have different way of doing that.. Common one?