0

I am trying to validate some fields in DIV and if theres no validation error, I would show a comfirmation popup, below is my code, apparently the popup doesn't appear, if I remove the Page_ClientValidate(); and the popup will show. Please kindly advice. Thanks.

<asp:Button ID="uibtnVoucherIssuance" runat="server" Text="<%$ Resources : Resources, uiIVouchers %>"
OnClientClick="if(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); if(Page_IsValid){return confirm('Proceed with voucher issuance?');}"
ValidationGroup="Issuance" />
Kristoffer Sall-Storgaard
  • 10,576
  • 5
  • 36
  • 46
k80sg
  • 2,443
  • 11
  • 47
  • 84
  • 1
    Did you check error console in browser? If there are no errors then you Page_IsValid might be set to true in this function – Cheery Jan 27 '12 at 08:43

1 Answers1

0

Can you check this post: Page_ClientValidate is validating multiple times.

<asp:Button ID="uibtnVoucherIssuance" runat="server" Text="Test" OnClientClick="checkValidation()" ValidationGroup="Issuance" />

<script type="text/javascript">
    function checkValidation() {
        if (typeof (Page_ClientValidate) == 'function') Page_ClientValidate('');
        if (Page_IsValid) { return confirm('Proceed with voucher issuance?'); }
    }
</script>
Community
  • 1
  • 1
Zayar
  • 347
  • 2
  • 11