forked from BG4U-KARAN/project_web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforget.js
More file actions
28 lines (28 loc) · 763 Bytes
/
forget.js
File metadata and controls
28 lines (28 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<script type="text/javascript">
$(document).ready(function(){
$( "#form2" ).submit(function(event) {
event.preventDefault();
$.ajax({
type: 'POST',
url: '/forgetpass',
data: $('#form2').serialize(),
dataType: "json",
success: function(response){
//alert("a");
//console.log(response.Success);
$('#form2')[0].reset();
//alert("abc");
document.getElementById("check").innerHTML=response.Success;
setTimeout(function(){
document.getElementById("check").innerHTML="";
},3000);
if (response.Success=="Password changed!") {
document.getElementById("aa").click();
};
},
error: function() {
}
})
});
});
</script>