-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMiniprog.html
More file actions
103 lines (96 loc) · 3.17 KB
/
Miniprog.html
File metadata and controls
103 lines (96 loc) · 3.17 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<HTML>
<head>
<LINK rel="stylesheet" type="text/css" href="mini.css">
</head>
<BODY>
<H1> <CENTER> Enquiry Form </CENTER> </H1>
<table align="center" border="1" style="border-collapse:collapse;">
<FORM name="enquiryForm" method="POST" action="./enquiryServlet" onSubmit="return validateForm()">
<tr>
<th> SName </th>
<td> <input type="text" name="sname" size="15" maxlength="10" placeholder="Alex"/> <span id="snameErr"></span></td>
</tr>
<tr>
<th> Mail </th>
<td><input type="text" name="email" placeholder="user@gmail.com" /> </td>
</tr>
<tr>
<th> Password </th>
<td><input type="password" name="pass" /> </td>
</tr>
<tr>
<th> Mobile </th>
<td> <input type="text" name="mobile" placeholder="1234506789" /> </td>
</tr>
<tr>
<th> Upload Resume </th>
<td> <input type="file" name="file" /> </td>
</tr>
<tr>
<th> Courses </th>
<td> <SELECT name="courses" size="5" MULTIPLE>
<OPTION value="CJ">Core Java</OPTION>
<OPTION value="AJ">Adv Java</OPTION>
<OPTION value="Hibernate">Hibernate</OPTION>
<OPTION value="Spring">Spring</OPTION>
<OPTION value="MEAN">MEAN</OPTION>
<OPTION value="Angular">Angular</OPTION>
<OPTION value="Android">Android</OPTION>
<OPTION value="Oracle">Oracle</OPTION>
</SELECT>
</td>
</tr>
<tr>
<th> Track: </th>
<td> Normal Track <INPUT type="radio" name="track" value="NT"/> Fast Track <INPUT type="radio" name="track" value="FT"/> </td>
</tr>
<tr>
<th> Workshop </th>
<td> <INPUT type="radio" name="track" value="WS"/> </td>
</tr>
<tr>
<th> Qual: </th>
<td> BTech <INPUT type="checkbox" name="qual" value="BTech"/> MTech <INPUT type="checkbox" name="qual" value="MTech"/> BSc <INPUT type="checkbox" name="qual" value="BSc"/> MSc <INPUT type="checkbox" name="qual" value="MSc"/> </td>
</tr>
<tr>
<th> Occupation: </th>
<td> <SELECT name="occupation" size="1">
<OPTION value="Student">Student</OPTION>
<OPTION value="Employee">Employee</OPTION>
</SELECT> </td>
</tr>
<tr>
<th> Address </th>
<td> <TEXTAREA name="address" rows="10" cols="20"></TEXTAREA> </td>
</tr>
<tr>
<th> <input type="submit" name="submit" value="Submit Enquiry"/> </th>
<th> <input type="reset" name="reset" value="Clear Form"/> </th>
</tr>
</FORM>
</table>
</BODY>
<HEAD>
<!--This is a comment in line number 75-->
<TITLE>HTML Form Example</TITLE>
<SCRIPT language="JavaScript" type="text/javascript">
var err="";
var flag=false;
function validateForm() {
var sname=window.document.enquiryForm.sname;
var snameErr=window.document.getElementById("snameErr");
var snameVal=sname.value;
if(snameVal.length==0) {
err+="SName field is empty";
snameErr.innerHTML="<font color='red'>SName is empty</font>";
}
if(err.length==0) {
flag=true;
} else {
window.alert(err);
}
return flag;
}
</SCRIPT>
</HEAD>
</HTML>