From d530d85556380be317147ed75a18e44cd2fde729 Mon Sep 17 00:00:00 2001 From: gebele Date: Tue, 25 Jun 2013 16:49:41 +0200 Subject: added TODO for js function IE bug --- views/predict.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/predict.haml b/views/predict.haml index 7dfc786..af601b0 100644 --- a/views/predict.haml +++ b/views/predict.haml @@ -7,8 +7,9 @@ }; return true; }; + //TODO change function for IE; true instead length does not work ! function checkboxes () { - if ($("#model input[type=checkbox]:checked") == true ){ + if ($("#model input[type=checkbox]:checked").length < 1 ){ alert("Please select an endpoint.") document.getElementById('model').focus(); return false; @@ -28,8 +29,7 @@ }; }; - -/ whole site content needs to be in one form. Input and checkboxes are proofed by js functions. +// whole site content needs to be in one form. Input and checkboxes are proofed by js functions. %form{:name => "form", :action => to('/predict'), :method => "post", :enctype => "multipart/form-data", :onsubmit => "return !!(checksmiles() & checkboxes())" } %fieldset#top %a{:href => "#", :id => "linkInsert"} -- cgit v1.2.3