×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Jing Tai Piao
Added: Aug 30, 2012 11:30 PM
Modified: Aug 30, 2012 11:32 PM
Views: 11
Tags: no tags
in Jquery, to use call valdateEmptyForm($selector)
  1. function valdateEmptyForm(dom) {
  2. var empty = true;
  3. dom.each(function(index, obj){
  4. if($.trim($(obj).val()).length>0 && $(obj).val()!= "CANCEL" && $(obj).val()!= "Save & Close" && $(obj).val()!= "Save & Add New") {
  5.               empty = false;
  6. }
  7. });            
  8. return empty;  
  9. }