[jQuery] Validation on a button click, Validation to check many inputs with same class
Hi all I was wondering if someone could please help me with the jquery validation. I have a foreach loop that creates many input text rows and i would like jquery validation to check on button click if each of the input boxes meets the requirements. Right now on button click it is only checking the first input box and if that is true then the button works but i want validation to check all three inputs to see if they are TRUE and then only should the button work. Thanks Code: //Button click with validation check inside document.ready() $('.pay').click(function() { if(!$('#checkoutform').validate().form()){ return false; } }); //JQuery custom method outside document.ready() jQuery.validator.addMethod("inputval", function(value, element) { staticval = $('#prevalue'+element.id).val(); currentVal = element.value; if(Number(currentVal) < Number(staticval)){ if($(element).parents('.container').find('table.subtotal-table').is (':hidden')){ $(element).parents('.container').find('.minimize').click(); } return false; } else { return true; } }, 'Min Amt or higher required.'); $("#checkoutform").validate(); //one of the inputs in the foreach. These can become multiple inputs //This code is inside the form checkoutform ".$prevalhidden:$d['ee.fee']['value']?> Thanks for the help
[jQuery] validation on multiple text inputs on button click
Hi All Was wondering if anyone could help me on this problem i am having. I have a form which contains a foreach loop and this loop outputs as many generated input fields as there is data in the database. My jQuery validation on submit is only seeming to validate the first input box of however many input boxes. I would like validation to check all the inputs and if requirments are met for the inputs then return true or else return false if it doesnt meet the requirments of the custom validation method. This is the input box inside the foreach, the foreach can output many of these filling in different data using the variables. My validation right now is checking the class "inputval" but it only seems to check the first input. Here is my validation: jQuery.validator.addMethod("inputval", function(value, element) { staticval = $('#prevalue'+element.id).val(); currentVal = element.value; if(Number(currentVal) < Number(staticval)){ if($(element).parents('.container').find('table.subtotal-table').is (':hidden')){ $(element).parents('.container').find('.minimize').click(); } return false; } else { return true; } }, 'Min Amt or higher required.'); $("#checkoutform").validate(); And i am also checking for validation on a button.click in jquery. This validation is not checked on form submit but rather on a jquery button click. Here is the button with check: $('.pay').click(function() { if(!$('#checkoutform').validate().form()){ return false; } Any advice on this problem will be greatly appreciated. i have tried looping through in the validation using a .each so that it checks all inputs but even this fails. Thanks
[jQuery] TinyMce with .load
Hi All I am trying to use tinymce as a callback in the jQuery .load. Problem im having is that the tinymce box becomes frozen so that i cannot focus on it. if i click any of the buttons on the toolbar then tinymce works again. any suggestions? This only happens in IE $("#replaceLanguage").load(url, function(){ if(correctselect){ tinyMCE.init({ // General options mode : "textareas", theme : "advanced", theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,cut,copy,paste,pastetext,pasteword,|,undo,redo,|,link,unlink", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_buttons4 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : false, setup : function(ed) { ed.onKeyUp.add(function(ed, e) { checkifchanged(ed); //alert(ed.getContent()); }); } }); } }); Thanks
[jQuery] Anyone work with jquery FLOT that can help me please?
Hi, looking for someone that might be a guru with jquery flot? Thanks