-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom-validate.js
More file actions
32 lines (26 loc) · 805 Bytes
/
Copy pathcustom-validate.js
File metadata and controls
32 lines (26 loc) · 805 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
29
30
31
32
// JavaScript Document validation functions
// check start and end places
function formchecker()
{
// Check the value of the element named text_name from the form named text_form
if (document.mainForm.start.value == "")
{
// If null display and alert box
alert("Please fill in the Start Place.");
// Place the cursor on the field for revision
document.mainForm.start.focus();
// return false to stop further processing
return (false);
}
if (document.mainForm.end.value == "")
{
// If null display and alert box
alert("Please fill in the Destination.");
// Place the cursor on the field for revision
document.mainForm.end.focus();
// return false to stop further processing
return (false);
}
return true;
}
//#####......................