Hi,
Um I'm not too sure what you mean by 'if the condition is met' - if you could let me know what you're trying to check for, I'll see if I can write the code for you.
In the meantime, here's an example that is kind of similar, it uses a function though. The popup redirects and closes if the checkbox is checked.
-- page1.htm --
<HTML>
<HEAD>
</HEAD>
<BODY>Original Page (page1.htm)<br>
<a href="page1.htm" onClick="window.open('popup.htm')">Click here to open new window</a>.
</BODY>
</HTML>
-- popup.htm --
<HTML>
<HEAD>
<script language="javascript">
function redirect()
{
if (document.popupForm.redirectMe.checked)
{
window.opener.location = "page2.htm";
window.close()
}
}
</script>
</HEAD>
<BODY>Popup Page (popup.htm)<br>
<form name="popupForm">
<input type="checkbox" name="redirectMe" value="redir" onClick="redirect()">If you check this box, the redirect occurs and this window closes.
</form>
</BODY>
</HTML>
-- page2.htm --
<HTML>
<HEAD>
</HEAD>
<BODY>Redirect Page (page2.htm)<br>
<a href="page1.htm">Click here to return to page1.htm</a>.
</BODY>
</HTML>
-- end of script --
Hope that is of some help... as I say, if you post some more details I'd be happy to give it another go.
Jen