diff options
-rw-r--r-- | index.html | 2 | ||||
-rw-r--r-- | js/istreamdev.js | 9 |
2 files changed, 7 insertions, 4 deletions
@@ -184,7 +184,7 @@ <a href="#home" id="home_but" class="button slideup">Home</a> <h1></h1> </div> - <form name="timer" id="timer" action=""> + <form name="timer" id="timer" onsubmit="checktimerform();"> <ul class="rounded"> <li><span class="timertitle">Active</span><span class="toggle"><input id="timer_active" name="timer_active" type="checkbox" /></span></li> </ul> diff --git a/js/istreamdev.js b/js/istreamdev.js index 8dc2024..7bb151b 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -700,7 +700,6 @@ $('#edittimer a[rel="deletetimer"]').tap(function(event) { });
});
-
// gen Timers
function gen_timers(edit) {
$('#timers ul[rel="timers"]').html('');
@@ -821,8 +820,12 @@ function gen_formchanlist() { // TIMER FORM VALIDATION & SUBMIT
$('.submit_form').tap(function(event) {
event.preventDefault();
- $('.formerror').hide();
+ checktimerform();
$(this).removeClass('active');
+ });
+
+function checktimerform() {
+ $('.formerror').hide();
var timer_name = $("input#timer_name").val();
if (timer_name == "") {
$("li#timer_name_error").show();
@@ -861,7 +864,7 @@ $('.submit_form').tap(function(event) { return false;
});
return false;
-});
+};
function showStatus( timeout, message ) {
if( timeout == 0 ) {
|