-
Notifications
You must be signed in to change notification settings - Fork 1
/
signup.js
72 lines (60 loc) · 1.52 KB
/
signup.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*function check_user()
{
var username= document.getElementbyId("user").innerHTML;
if(!username)
{
document.getElementbyID("username").style.color="red";
}
else
{
var xmlhttp=new XMLHttpRequest();
}*/
function isValidEmail(mail)
{
// console.log("qqqqqqqqqq");
var x=document.getElementById("email").value;
if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/).test(x))
{
document.getElementById("wrongmail").innerHTML="";
// console.log("ssss");
document.getElementById("maildiv").style.borderColor="black";
return 1;
}
else
{
document.getElementById("wrongmail").innerHTML="invalid email";
// div.style.color=red;
// console.log("wwwww");
document.getElementById("maildiv").style.borderColor = "red";
return 0;
}
}
/*function isValidEmail()
{
var email = document.getElementById("emailvalid");
if(!email.match( /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/))
{
document.getElementByID("emailvalid").innnerHTML='Please provide a valid email address';
document.getElementbyID("wrongmail").style.color="red";
return false;
}
else
{
return true;
}
}*/
/*function checkno(nos)
{
var no=document.getElementbyID("no").value;
if(!no)
{
document.getElementbyID("wrongnumber").innnerHTML="PLease fill this field";
document.getElementbyID("number").style.bordercolor="red";
return false;
}
else
{
return true;
}
}*/
//function check