mardi 24 novembre 2015

Why this jquery validation not wrking in IE8. Let me know the solutions please

I want to validate checkbox,onclick the submit, if its checked the control goes to text box otherwise it may disable.Its fine with latest browsers but not working in IE8 & IE9.

    <script type="text/javascript">
    $(function () {
    $("#chkPassport").click(function () 
    {
    if ($(this).is(":checked")) {   
    $("#txtNumber").removeAttr("disabled");
    $("#txtNumber").focus();      
    }
    else 
    {
    $("#txtNumber").attr("disabled", "disabled");
    } 
    });
    });  
</script>   
//html follows

<form action="Orgpaymentgateway.spring" id="orgpaymentgateway" method="post" name="orgpaymentgateway" onsubmit="return checkCheckBox(this)">
<ul>
 <li>
   <div class="pack">
    <label for="chkPassport">
<input type="checkbox" id="chkPassport" required  name="myPack[]" id="group_name_0" onchange="this.setCustomValidity(validity.valueMissing ? 'Please Select atleast one package ' : '');"  />
</label>
<br />
<img src="images/image-sample.jpg" style="vertical-align:middle;padding:10px 40px;">
<br />
<input type="text" required  name="quantity[]"  onkeydown="return AllowNonZeroIntegers(event)" id="txtNumber"  placeholder="License Count" disabled="disabled"/>
 </div>
</li>                      
</ul>
<div class="clearfix"></div>
<div class="sub_but">
<input type="submit" value="Proceed to Checkout" class="sub-btn" name="Sumbit">
</div>
</form>




Aucun commentaire:

Enregistrer un commentaire