PDA

View Full Version : Pop-up window and parent window stops loading


Paintr
05-19-2003, 04:14 AM
I have a link that calls a pop-up window fome within a table but whwn the window opens the parent window does not finish loading, it immediately goes to a done status. How do I fix this?

<td>
<SCRIPT Language="JavaScript">
<!-- hide from old browsers
document.write('<a class="type2" href="javascript:windowHandle = window.open('+"'"+'update.html'+"'"+', '+"'"+'update'+"'"+', '+"'"+'width=400, height=400, resizable=yes, scrollbars=yes, status=yes'+"'"+'); windowHandle.focus()" onMouseOver="return Description('+"'"+'Read a pop-up list of updates for the month'+"'"+')" onMouseOut="Normal()">Monthly Updates</a>')
//-->
</script>
<NOSCRIPT>
<a class="type2" href="update.html">Monthly Updates</a>
</NOSCRIPT>
</td>

requestcode
05-19-2003, 01:45 PM
I suspect it is because you are removing focus from the parent window and placing it on the child (popup) window with this:
windowHandle.focus().

You must be doing some heavy loading in the parent window for it not to finish before the link is clicked on. If you remove that statement then the popup would probably go behind the parent window. Not sure what would be your solution.

Paintr
05-19-2003, 03:06 PM
Thanks for that info, I'm pretty new to JavaScript and I don't know what all the code does. I tried removing the
; windowHandle.focus()
and when the window popped up it stayed on top but the parent window turned blank except this
[object]