Hello,

not sure if correct forum... and i do apologise if it is


i want to close a website window 20 seconds after the button has been clicked... i have put this in so far

any help woluld be appreciate.... this is the only javascript i need to do

[code]
<title>Email Address</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!-- if (window.opener) window.onblur = function() { setTimeout(function())
{ window.close(); }, 20); }; //--> </script>



<?
$course_id=$id;
# this must be at the top of the entire page
# because we may need to do a redirection (see below)
if ( isset( $_POST['EMAIL'])) {
if( !eregi( "^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$", $_POST['EMAIL'])) {
# Invalid email address format
die( "Invalid E-mail. Please go back and try again." );
}
else {
list( $user, $domain) = split("@", $_POST['EMAIL']);
if( !getmxrr( $domain.'.', $MXHost)) {
if( !fsockopen( $domain, 25, $errno, $errstr, 30)) {
# Invalid email host
die( "E-mail cannot be authenticated. Please go back and try again." );
}
else {
# All good, email appears to be valid!
# modify the line below to use your website's URL
header( "Location: http://www.burngreave.net/~fizlar/mail.php?EMAIL=" . $_POST['EMAIL'].'&'.$course_id);

# email info passed on to the mail.php page.
exit;
}
}
}
}
?>
<html>
<body>
<form method="post" action="">
<input type="text" name="EMAIL" value="" />
<input type="submit" value="Submit" />
</form>
</body>
</html>

<body>

</body>
</html>
[code]