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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:37:19+00:00 2026-06-09T23:37:19+00:00

I am using the following function: $.each($(‘.update-grid’), function (i, e) { var ID =

  • 0

I am using the following function:

$.each($('.update-grid'), function (i, e) {
var ID = e.id.replace('modal', 'input');
$("#" + ID).val(e.value);
}); 

to get a value that’s just been entered into an input field such as this after form submission. The requirement is to take this user enterered value and put it in another field. For example transfer the value entered into #modal-title into the field #input-title.

<input id="modal_Order_1" class="update-grid full-width" type="text" 
value="337" name="Content.Order" >

However the “e.value” gives me the value 337 and not the value that the user entered just before the form was submitted.

Is there a way I can get the NEW value entered?

Update:

This seems to work:

        $('.update-grid')
            .each(function () {
                var id = this.id.replace('modal', '');
                $('#input' + id).val(this.value)
            })
  • 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-09T23:37:21+00:00Added an answer on June 9, 2026 at 11:37 pm

    You’re using the .each function incorrectly. You will need to rely upon the .change event, this means it wil be triggered after a change has been input (and the field loses focus).

    So given your code, I would say:

    $('.update-grid').change(function () {
    
            var id = $(this).attr("id").replace('modal', 'input');
    
            var new_value = $(this).val();
    
            $('#' + id).val(new_value);
    
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to replace each textNode of the DOM tree using the following function:
I am using the following jQuery functionality to count words in real time: $(input[type='text']:not(:disabled)).each(function(){
I'm using the following placeholder plugin (function($){ var ph = PLACEHOLDER-INPUT; var phl =
I am using the following tabs in a project : //Tabs $('ul.tabs').each(function(){ var $active,
I have the following: $(span.findme).each(function() { $(<li>).text($(this).text()).appendTo(ul); }); How can I, using the above,
I am using the following function and code to try to get the size
I'm using the following in order to have on screen display of each value
Please consider the following function body: var isValidated = true; $(selector1).each(function(){ //do validation with
I'm parsing a XML using jQuery with the following code: function appendNav(xml) { $(xml).find(Nav).each(function()
Say I'm using the following Ajax call: $(document).ready(function () { $.ajax({ type: GET, url:

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.