Try this. Use a session only cookie to indicate a DHTML window is open once that's the case. Here's an example, with the interesting parts highlighted in red:
Code:
<script type="text/javascript">
function openwindow(){
var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")
document.cookie="googlewin=1"
}
if (document.cookie.indexOf("googlewin")!=-1) //if "googlewin" DHTML window has been opened previously within this browser session
openwindow() //open it again when the page loads
</script>
<a href="#" onClick="openwindow(); return false">Open DHTML window "googlewin"</a>
The above link when clicked on calls openwindow(), an arbitrary function that in turn opens a DHTML window using the documented syntax and assigns the result to the variable "googlewin". The code in red then uses JavaScript cookies to indicate that this window has been open. Following this function is a check for whether this DHTML window was previously open (within the current browser session), and if so, automatically open the window again when the page loads, by calling openwindow().
You should be able to adapt the above example to work for your own code.
Bookmarks