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 8683887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:09:33+00:00 2026-06-12T22:09:33+00:00

I have been using jQuery for a while and this makes no sense to

  • 0

I have been using jQuery for a while and this makes no sense to me. Can anyone explain why this is happening? I have a hidden field , <asp:HiddenField ID="hidIsValid" runat="server" /> and I have this code assigning a value to it.

This took me hours to decide to try to change the way I set the value , and now it works , but it appears this is the wrong way:

  $('#<%= hidIsValid.ClientID %>').val("true");  **This line never worked
  $('#<%= hidIsValid.ClientID %>').val() = "true";  **this line does work

I comes from here , I took out a lot of the code ,this is just ot show the pertinent lines.

      function fnValidateAttendees() {
       // $('#<%= hidIsValid.ClientID %>').val("true");  **This line never worked
        $('#<%= hidIsValid.ClientID %>').val() = "true";            
        $('.tFirstName, .tLastName').each(function () {
            if (!($(this).val().match(/^[a-z -']+$/))) {                    
                $('#<%= hidIsValid.ClientID %>').val("false"); //**this line works
            }              
        });
        $('.tPhoneNumber').each(function () {
            if (!($(this).val().match(/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/))) {                   
                $('#<%= hidIsValid.ClientID %>').val("false"); //**this line works
            }
        });
        $('.tEmail').each(function () {
            if (!($(this).val().match(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/))) {
                $('#<%= hidIsValid.ClientID %>').val("false"); //this line works
            }
        });
        return true;
    }        

can someone make sense of this

  • 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-12T22:09:35+00:00Added an answer on June 12, 2026 at 10:09 pm

    How can you make out that this does not work..

    Setting the value using .val() will not be reflected in the DOM immediately..

    Maybe that’s the reason you feel its not working..

    Also this does not make any sense..

    $('#<%= hidIsValid.ClientID %>').val() = "true"; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a asp.net mvc2 app. I have been using jquery to do
I been using the jquery ui for quite a while now. This is the
Can anyone explain what the jquery documentation is exactly referring to with this statement:
I have been using jquery for my web development for a while, and when
I have been using the jQuery date picker for a while and its great.
I have been working with this JQuery image carousel for a while, and am
I have been using Jquery alot lately an was wondering if I should use
I have been using a jquery slideshow, but when I include a jquery newsticker
I have been using (and loving ) the jQuery intellisense for Visual Studio 2008
I've been using jquery on and off for the last 6 months. I have

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.