Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery validation plugin not working in IE7
    primarykey
    data
    text
    <p>I have a form page. However, the form page does not <strong>validate in IE7</strong>. I do not see any error message either in the console. It validates in all other browsers...</p> <p>My js code is below</p> <pre><code>$(document).ready(function () { /* clear the form values when refreshed or reload*/ function ClearForm() { document.submitDetails.reset(); } $("input:not(':button, :submit, :reset, :hidden')").val('').checked = false; /*pretty chekable*/ /*$('input.prettyCheckable').prettyCheckable({}); */ /*rulesets for validations*/ var ruleSet1 = { required: true, maxlength: 120, email: true }; var ruleSet2 = { required: true, maxlength: 80 }; var ruleSet3 = { required: true, maxlength: 10, minlength: 8, number: true }; var ruleSet4 = { required: true, maxlength: 4, minlength: 4, number: true }; var ruleSet5 = { required: true, maxlength: 2, minlength: 2, number: true }; $('#custom8').on('change', function () { this.value = this.checked ? 1 : 0; }).change(); $('#custom9').on('change', function () { this.value = this.checked ? 1 : 0; }).change(); $('#custom8').on('change', function(){ $(this).valid() }) $('#custom9').on('change', function(){ $(this).valid() }) $('#submitDetails').validate({ /*if need to show error # message at top */ /* showErrors: function(errorMap, errorList) { $("#messageBox").html("This form contains " + this.numberOfInvalids() + " errors, see details below."); this.defaultShowErrors(); },*/ // onfocusout: true, onkeyup: true, onclick:true, focusCleanup: true, // 1. validation rules. rules: { firstName: ruleSet2, lastName: ruleSet2, address: ruleSet2, suburb: ruleSet2, state: { required: true }, mobile: ruleSet3, postCode: ruleSet4, email: ruleSet1, custom1: { required: true }, custom2: { required: true, number: true, min: 30 }, custom3: { required: true }, custom4: { required: true }, custom5: { required: true }, custom6: { required: true, maxlength: 2, minlength: 2, number: true, min: 00, max: 23 }, custom7: { required: true, maxlength: 2, minlength: 2, number: true, min: 00, max: 60 }, custom8:{ required: true } }, groups: { time: "custom6 custom7", date: "custom3 custom4 custom5" }, errorPlacement: function (error, element) { if (element.attr("name") == "custom2") error.appendTo(".errorPurchase"); else if ((element.attr("name") == "custom6") || (element.attr("name") == "custom7")) error.appendTo(".errorTime"); else if ((element.attr("name") == "custom8")) error.appendTo("#error_msg"); else if ((element.attr("name") == "custom3") || (element.attr("name") == "custom4") || (element.attr("name") == "custom5")) error.appendTo(".errorDate"); else error.insertAfter(element); }, messages: { firstName: "Please enter your first name", lastName: "Pleae enter your last name", address: "Please enter your street address", mobile: "Please enter valid 10 digit phone number (including area code for landline)", postCode: "Please enter the 4 digits of your post code", state: "Please select the store's state where you made your purchase", email: "Please enter a valid email address", custom2: "Total amount must be exact to the cent - minimum $30", custom6: "Please enter the time (hours and minutes) found on your receipt in the format hh:mm. For example if 9:05am, please enter 09 in first field and 05 in second field.", custom7: "Please enter the time (hours and minutes) found on your receipt in the format hh:mm. For example if 9:05am, please enter 09 in first field and 05 in second field.", custom3: "Sorry, the date you have selected does not exist. Please check and try again", custom4: "Sorry, the date you have selected does not exist. Please check and try again", custom5: "Sorry, the date you have selected does not exist. Please check and try again", suburb: "Please enter your town/suburb", custom1: "Please select the store you made your purchase", custom8: "You need to agree to participate in this competition" } }); ///execute when submit button is clicked $("#submit").click(function () { if (document.getElementById("custom8").checked) { document.getElementById('custom8Hidden').disabled = true; } if (document.getElementById("custom9").checked) { document.getElementById('custom9Hidden').disabled = true; } }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload