Hi all, I am using validate (1.5.4) plugin to validate numeric input field with max:5000.00. When the numeric value is formatted as "2,999.00", the max validation failed. After some investigation, it turns out the max function compare the value "2,999.00" as string with 5000.00 instead of 2999.00 with 5000.00. To fix this, I modified the existing value variable with parseFloat(value.replace(",","") in min:, max:, and range:. Note: Only works in countries that use "," as thousand separator. For Jörn, could this fix be included on your future release? Thanks.
Hi, I have a page with an asp:Button save that performs an ajax validation before post back. If the data is incorrect, the aspx returns a warning text message. The user can ignore the warning and continue to save the data. I managed to perform the desired result using the posted code below. Notice that the button click event is called 2 times first when the user trigger the event, then the 2nd time by target.click() after setting the doCheck and response values. I am not happy with the code. Is there any other way to replace target.click() with some thing which by pass the validation again? var doCheck = true; var response = true; $(document).ready(function() { $("input[name$='ajaxConfirm']").bind("click", function(e) { var target = $(e.target); if (doCheck) { $.get("GetConfirmation.aspx", { param1: "test", param2: "data" }, function(result) { if (result != "") { response = confirm(result); } doCheck = false; target.click(); //replace this } , "text"); e.preventDefault(); } else { if (!response) e.preventDefault(); doCheck = true; response = true; } }); -- Generated asp:Button <input type="submit" name="ctl00$conMain$ajaxConfirm" value="Ajax Confirm" id="ctl00_conMain_ajaxConfirm" />
I am working with asp.net. Before the page is submitted to the server, an ajax validation is called to confirm the update. The user is allowed to cancel the save using client side confirm(). If the user back out, I want to prevent the submit by calling preventDefault (). However, jquery returns error "Member not found". Any Idea? Here is the code: <script type="text/javascript"> $(document).ready(function() { $("#Button1").click(function(e) { $.get("GetConfirmation.aspx", { param1: "test", param2: "data" }, function(result) { if (!confirm('Do you want to continue?')) e.preventDefault(); } , "text"); }); </script>