To many here, this would be a simple issue, but am new to Javascript and I dont knw how to go about it.
This is what i have:
a) A window pops up from a page, and user does some posting/uploading/adding operations(PHP), all involve refreshing this newly opened window.
what i want is , when the user closes this new pop up window(by clicking on the RED 'X' at the top) i want the parent window to be refreshed.
This is what i have(new pop up window) :
This is wht i want, but the problem is , everytime the child window refreshes, child window gets closed and the parent window is refreshed. I want this 'close and refresh' behavior to happen only when the window is closed(through the RED X at the top right of the window ONLY).PHP Code:<script>
function ref(){
window.opener.location.reload(true);
window.close();
}
</script>
<body onunload="ref()">
</body>
Any help would be great.
Best,
Kris



Reply With Quote
Bookmarks