Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8591099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:26:54+00:00 2026-06-11T23:26:54+00:00

Issue: Issue is due to "ValidatorCalloutExtender" which fires even when the RequiredFieldValidator is disabled

  • 0

Issue:
Issue is due to "ValidatorCalloutExtender" which fires even when the RequiredFieldValidator is disabled using javascript ValidatorEnable(val, enabled) Method.

Possible Duplicate:
How not to trigger RequiredFieldValidator on hidden field (TextBox)

Please Refer this Question First.

Remove empty space when visible property is set to false using JavaScript

In the above Question my empty space problem is solved but Another problem started to bug me.

I used the .style.display = "block"; and .style.display = "none"; properties to a textbox which has Ajax RequiredFieldValidator. When the Style is block, the TextBox is Displayed and when it is Empty The RequiredFieldValidator is popping. Until not this is Fine.

But when the TextBox Display Style is set to "none",the RequiredFieldValidator is popping on the top left corner of the page and not allowing postback.

Can you Help me??

Here is the JavaScript Code

<script type="text/javascript">
function OtherProof(val) {
    // or use this both works
    //var ProofType = document.getElementById("ddl_IDProof");
    //var SelectedProofType = ProofType.options[ProofType.selectedIndex].value;
    if (val == "0") {
        document.getElementById("lbl_OtherProof").style.display = "block";
        document.getElementById("tb_OtherProof").style.display = "block";
    }
    else {
        document.getElementById("lbl_OtherProof").style.display = "none";
        document.getElementById("tb_OtherProof").style.display = "none";
    }
}
</script>

Here is the aspx Code

//Dropdown list whoch on selected i make the textbox Display and Disappear
<asp:DropDownList ID="ddl_IDProof" runat="server"
                 onchange="OtherProof(this.options[this.selectedIndex].value);"
                  Width="155px">
                    <asp:ListItem>Driving License</asp:ListItem>
                    <asp:ListItem >Voter Card</asp:ListItem>
                    <asp:ListItem>Pan Card</asp:ListItem>
                    <asp:ListItem Value="0">Other Proof</asp:ListItem>
                </asp:DropDownList>

//Here are the label and Textbox which i make Display and Disappear
 <td><asp:Label ID="lbl_OtherProof" runat="server" Text="Other Proof" Font-Size="13px" style="display:none"></asp:Label></td>
                <td></td>
                <td>
                <asp:TextBox ID="tb_OtherProof" runat="server" Width="150px" MaxLength="30" style="display:none"></asp:TextBox>
                           <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="tb_OtherProof" FilterType="UppercaseLetters,LowercaseLetters,Custom" ValidChars=" "></asp:FilteredTextBoxExtender>
                           <asp:RequiredFieldValidator ID="Req_OtherProof" runat="server" ErrorMessage="Proof Name is Mandatory" ControlToValidate="tb_OtherProof" Display="None"></asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" Enabled="True" TargetControlID="Req_OtherProof" 
                     CssClass="customCalloutStyle">
                    </asp:ValidatorCalloutExtender></td>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:26:55+00:00Added an answer on June 11, 2026 at 11:26 pm

    Try using ValidatorEnable(val, enable)

    Takes a client-validator and a Boolean value. Enables or disables a client validator. Being disabled will stop it from evaluating and it will always appear valid.

       <script type="text/javascript">
      function disableValidation() {
       var val = document.getElementById('Req_OtherProof');
       ValidatorEnable(val, false);
       if (document.getElementById("ValidatorCalloutExtender7_popupTable") != null) {
          document.getElementById("ValidatorCalloutExtender7_popupTable").style.display = "none";
       }
      }
    
        function OtherProof(val) {
        // or use this both works
        //var ProofType = document.getElementById("ddl_IDProof");
        //var SelectedProofType = ProofType.options[ProofType.selectedIndex].value;
        if (val == "0") {
            document.getElementById("lbl_OtherProof").style.display = "block";
            document.getElementById("tb_OtherProof").style.display = "block";
        }
        else {
            document.getElementById("lbl_OtherProof").style.display = "none";
            document.getElementById("tb_OtherProof").style.display = "none";
            disableValidation();
        }
     }
        </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have bandage due to 5th metacarpal damage. Typing is no issue at all,
I'm having a tricky debugging issue, perhaps due to my lack of understanding about
Excuse the simple question, the issue i'm having maybe due to lack of sleep.
Issue: RODBC (falsely) returning zero rows Situation: I'm using RODBC to connect to a
i'm programming a little game with opengl and C. I've encountered an issue: due
I have this issue: Due to design concerns, the ASP.NET webpage I am currently
I am struggling with an issue certainly due my lack of understanding on the
i've got an issue due to database conception. My data are grouped in a
I am facing loading time taking - performance issue due to many linkbuttons in
I have an issue where due to some elements loading faster than others, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.