javascript - progress bar and requiredfieldvalidator -


I am using the progress bar and the required field videoconues. But when I click the submit button Both the progress bar and the verifier message are my code shown

  & lt; Script type = "text / javascript" & gt; Function ShowAdiv () {setTimeout ('document.getElementById ("PB"). Style.display = "inline";', 500); } & Lt; / Script & gt; ... and & lt; ASP: Button ID = "btnSubmit" runat = "server" text = "send" ValidationGroup = "ValGrpSave" onclick = "btnSubmit_Click" OnClientClick = "ShowDiv ()" /> ... & lt; Asp: text box id = "txtEmail1" width = "350px" runat = "server" /> & Lt; ASP: RequiredFieldValidator id = "RequiredFieldValidator2" runat = "Server" ValidationGroup = "ValGrpSave" errorCell = "<
field missing

Issue Required Is "display =" none "ControlToValidate =" TxtEmail1 "/> & Lt; Cc1: Value Callout Accender ID = "Valuerator Callout Accender 2" Runat = "Server" TargetControlID = "Expected FieldValidate 2" />

The problem is that you can not stop submitting your button form and Because your form is not valid, your validator displays the message.

If your button only needs to show the progress bar, try changing it to your script function (this is a different argument to change the non-server button instead because it does not have any server-side functionality But let's leave it):

  function shtdiv (evt) {// display progress bar half time set timeout (function () {Document.getElementById ("PB"). Style.display = "Inline";}, 500); // Stop the button to stop the event dissemination so stop form evt.preventDefault (); return false; }   

I have also changed the setTimeout instead of a function prvide degraded string statement.

Also make changes to your button

  & lt; ASP: Button ID = "btnSubmit" runat = "server" text = "send" ValidationGroup = "ValGrpSave" onclick = "btnSubmit_Click" OnClientClick = "return look ();" / & Gt;    

Comments