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

  • SEARCH
  • Home
  • 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 7189199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:15:02+00:00 2026-05-28T19:15:02+00:00

I have a hidden text field whose value gets updated via an AJAX response.

  • 0

I have a hidden text field whose value gets updated via an AJAX response.

<input type="hidden" value="" name="userid" id="useid" />

When this value changes, I would like to fire an AJAX request. Can anyone advise on how to detect the change?

I have the following code, but do not know how to look for the value:

$('#userid').change( function() {  
    alert('Change!'); 
}) 
  • 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-05-28T19:15:05+00:00Added an answer on May 28, 2026 at 7:15 pm

    So this is way late, but I’ve discovered an answer, in case it becomes useful to anyone who comes across this thread.

    Changes in value to hidden elements don’t automatically fire the .change() event. So, wherever it is that you’re setting that value, you also have to tell jQuery to trigger it.

    function setUserID(myValue) {
         $('#userid').val(myValue)
                     .trigger('change');
    }
    

    Once that’s the case,

    $('#userid').change(function(){
          //fire your ajax call  
    })
    

    should work as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have <input type=text class=required value=XXX name=abc> <input type=hidden class=required value=XXX name=abcd> <input type=text
I have an hidden input field with a value, <form> <input type=hidden value=product/> <select
I have four input fields two text and two hidden. The HTML: <input type=text
I have a hidden input variable called str. I am assigning abc value to
I have a text field that can accept input of any kind. Based on
I would like to show some hidden text in a Flex application and have
Let's say we have a box with some short paragraphs: <div style=overflow:hidden> <p>Some text</p>
Quick question... I have an input box that upon key enter, adds the value
My page has a DetailsView that has a hidden field in it that gets
I have a text box in a div whose display is none by default

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.