summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-21 00:50:26 +0100
committerAlib <aliboba@free.fr>2010-03-21 00:50:26 +0100
commit2d1a22a6491a66f7dde69d2a348374c4a689bcca (patch)
treecabf7a7506220ec3129c0885ab8e0cc41ae6a469
parent47df9936768e093e30ed38001fa8104fd57aeec9 (diff)
downloadistreamdev-2d1a22a6491a66f7dde69d2a348374c4a689bcca.tar.gz
istreamdev-2d1a22a6491a66f7dde69d2a348374c4a689bcca.tar.bz2
corrected form submission from text input
-rw-r--r--index.html2
-rw-r--r--js/istreamdev.js9
2 files changed, 7 insertions, 4 deletions
diff --git a/index.html b/index.html
index 15e8579..0085f52 100644
--- a/index.html
+++ b/index.html
@@ -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 ) {