From 2d1a22a6491a66f7dde69d2a348374c4a689bcca Mon Sep 17 00:00:00 2001 From: Alib Date: Sun, 21 Mar 2010 00:50:26 +0100 Subject: corrected form submission from text input --- js/istreamdev.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'js') 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 ) { -- cgit v1.2.3