function complete(){ opener.location.reload( true ); document.getElementById("contactdetails").submit(); window.close(); }