forked from SHARVAI101/ded_4_lyf_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneral.js
47 lines (44 loc) · 1.73 KB
/
general.js
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/////////////////////////////////////////////////////////////////////////////
//forgot password
$(document).ready(function(){
$(".signupForm").submit(function(e){
e.preventDefault();
//alert("undau");
var formData = new FormData(this);
/*document.getElementById("fpError").innerHTML="Sending mail";*/
alert("here");
$.ajax
({
type: 'POST',
url: 'signuph.php',
data:formData,
//dataType: 'text', // what to expect back from the PHP script, if anything
cache: false,
contentType: false,
processData: false,
success: function (response)
{
//alert("ikde ala re!");
//alert(response);
if(response.trim()=="signup email error")
{
document.getElementById("signInError").innerHTML="This email already exists!";
}
else if(response.trim()=="not all filled")
{
document.getElementById("signInError").innerHTML="Please fill all the required fields.";
}
else
{
document.getElementById("signInError").innerHTML="Success";
}
alert(response);
},
error: function(xhr, status, error) {
alert(xhr.responseText);
}
});
return false;
})
});
/////////////////////////////////////////////////////////////////////////////