Here is my code
index.html
<html>
<head></head>
<body>
<div id="top"> New Record </div><br>
<form name="myForm"  onsubmit="return validateForm()" method="post">
 <h5>Record name: <input type="text" name="name" id="name"></h5>
 <div >
 <h5>Submitted Date <input id="sub" type="text" name="submited date" ></h5>
</div>
<div>
<h5>Started Date <input id="strtd" type="text" name="started date" ></h5>
</div>
 <div>
<h5> Record Type <select name="Record Type" id="options">
 <option value="Document">Documents</option>
 <option value="Pictures">Pictures</option>
<option value="Sounds">Sounds</option>
</select></h5>
</div>
 <div align="center">
<input id="submit" type="submit" value="Create">
<button id="cancel" type="button" onclick="ClearFields();">Reset</button>
</div>
</form>
</body>
</html>
and script is here
  $(function(){
 var pickerOpts = {
  appendText: "",
  defaultDate: "+5",
  showOtherMonths: true,
  dateFormat: "dd/mm/yy",
 };  
  $("#strtd").datepicker({
   minDate: 0
  });
  $("#sub").datepicker({ 
  maxDate: new Date, 
 minDate: new Date(2007, 6, 12)
  });
  $('#strtd').focus(function() {
 this.blur();
  });
 $('#sub').focus(function() {
  this.blur();
  });
   });
  //form validation
  function validateForm() {
var x = document.forms["myForm"]["name"].value;
var y= document.forms["myForm"]["strtd"].value;
var z= document.forms["myForm"]["sub"].value;
if (x==null || x=="") {
    alert("First name must be filled out");
    return false;
 }
else if (y==null || y=="") {
    alert("Started Date must be filled out");
    return false;
  }
 else if (z==null || z=="") {
    alert("Submitted Date must be filled out");
    return false;
  }
  else {
  alert("New Reocrd Created");
 window.location.href = "http://www.google.com";
  }
 }
function ClearFields() {
  document.getElementById("name").value="";
  document.getElementById("strtd").value="";
  document.getElementById("sub").value=""
}
In the above scripting code I have taken the example  "window.location.href = "http://www.google.com"; just for checking and my requirement is to move the page to another html page 
eg:details.html
on clicking on create button. Iam getting alert as "New Record Created" but not moving to next page. Hope anyone of you helps :) Thanks in advance
 
     
     
    