Now, if I remove "OnClientClick" event, it properly fires validator in other browsers as well.
I acautlly display progress bar after button is clicked.
So actually I have to call other javscript function only if all the validators are satisfied. If this is not correct way for all browser then any idea what is the correct way here to check on clientside if all the validators are satisfied ?
niravparekh
Member
704 Points
427 Posts
Re: .net Validators not working on any browser Chrome, Firefox etc.
Feb 29, 2012 07:40 PM|LINK
ok. I found one thing.
This is my button.
<asp:Button CssClass="ButtonCSS" runat="server" ID="btnSave1" OnClientClick="javascript:var validated= Page_ClientValidate('ValidationGroup1'); if(validated){ buttonClicked_WithObj(this); return true; };else {return false;};" Text="Save" ValidationGroup="ValidationGroup1" ToolTip="Click here to save" CausesValidation="true" OnClick="btnSave1_Click" /> JAVASCRIPT: function buttonClicked_WithObj(obj) { divWaitMessage.innerHTML = "Processing........<br />Please wait<br />" displayBanner_WithObj(divWait, obj); } function displayBanner_WithObj(oDiv, obj) { oDiv.style.position = "absolute"; var leftPos = getAbsoluteLeft(obj); var topPos = getAbsoluteTop(obj); oDiv.style.top = topPos - 30; oDiv.style.left = leftPos; oDiv.style.display = "block"; }Now, if I remove "OnClientClick" event, it properly fires validator in other browsers as well.
I acautlly display progress bar after button is clicked.
So actually I have to call other javscript function only if all the validators are satisfied. If this is not correct way for all browser then any idea what is the correct way here to check on clientside if all the validators are satisfied ?