You are here: irt.org | FAQ | JavaScript | Window | Q1761 [ previous next ]
You can close a main window without confirmation using the next script code:
<script language="javascript">
function closeWin() {
window.opener=parent;
window.close();
return true;
}
</script>Then in the button onClick event ...
<form> <input type="button" onClick="return closeWin()"> </form>
Submitted by Guille!