summaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-02-23 19:24:27 +0100
committerAlib <aliboba@free.fr>2010-02-23 19:24:27 +0100
commitbc39f6d40dbff3d08a6712d3e4c593d06033a680 (patch)
tree96e9b690de47c534c472f74ea4e088d0944d58ae /javascript
parent9062d1fa575867946bed6c2feb4cea7e26695142 (diff)
downloadistreamdev-bc39f6d40dbff3d08a6712d3e4c593d06033a680.tar.gz
istreamdev-bc39f6d40dbff3d08a6712d3e4c593d06033a680.tar.bz2
add form validation check for timers
Diffstat (limited to 'javascript')
-rwxr-xr-xjavascript/functions.js34
1 files changed, 33 insertions, 1 deletions
diff --git a/javascript/functions.js b/javascript/functions.js
index bf32859..a708963 100755
--- a/javascript/functions.js
+++ b/javascript/functions.js
@@ -157,4 +157,36 @@ function str_pad (input, pad_length, pad_string, pad_type) {
}
return input;
-}
+}
+
+function checkform()
+{
+
+ if ( document.timer.timer_name.value=="" )
+ {
+ alert('Recording name is missing');
+ return false;
+ }
+ else if ( document.timer.timer_chan.value=="" )
+ {
+ alert('Select a channel to record');
+ return false;
+ }
+ else if ( document.timer.timer_date.value=="" )
+ {
+ alert('Select recording date');
+ return false;
+ }
+ else if ( document.timer.timer_starttime.value=="" )
+ {
+ alert('Select recording start time');
+ return false;
+ }
+ else if ( document.timer.timer_endtime.value=="" )
+ {
+ alert('Select recording end time');
+ return false;
+ }
+
+ return true;
+}