<script type="text/javascript"> function closeandreload(){ document.form.submit() opener.location.reload(); setTimeout(window.close(), 100); }