hi all
On click of submit button If the email is sent, then I want to hide the contact form div.
My below code is not hiding the contact form
vineet
<?php
if(mail($to,$subject,$body,$headers))
{
echo "<script type='text/javascript'>";
echo "hideDiv();"
echo "</script>";
$msg="We have received your enquiry. We will contact you soon.";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function hideDiv()
{
document.getElementById("contact_form_div").style.display="none";
}
</script>
</head>
<body>
<form onsubmit="return validate()">
<!-- contact form content-->
<input type="submit" value="submit" name="submit" />
</form>
</body>
</html>