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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:33:09+00:00 2026-05-19T16:33:09+00:00

How to dynamically retrieve values from input text box : $(:input).each(function(){alert($(this).text());}); Case : Dynamically

  • 0

How to dynamically retrieve values from input text box :

   $(":input").each(function(){alert($(this).text());});

Case :

Dynamically column names are taken from xml source & binded in this manner :

<script type="text/javascript" language="javascript">
    $(document).ready(function(){

            $.ajax({
                type: "GET",
                url: "GetColumnNames.xml",
                dataType: "xml",
                success: function(xml) {
                    var cWidth =  100/(xml.getElementsByTagName("Column")).length;
                    $(xml).find('Column').each(function(){
                        var cId = $(this).find('Id').text();
                        var cName = $(this).find('Name').text();
                        $('<td id='+cId+' width='+cWidth+'>'+cName+'</td>').appendTo('#page-wrap');
                        $('<label for='+cName+'>'+cName+'<input type="text" name='+cName+'id='+cName+' value="" class="text ui-widget-content ui-corner-all" /></label>').appendTo('#moreItems');
                    });
                }
            });
        });
    </script>

The #moreItems is part of another div which is part of modal popup and i want to access values within that,

So,

after validation i go this way :

   if ( bValid ) {


                       $(":text").each(function(){
                        alert($(this).text());
                       });

}

But still i am not able to access input values.

Note :

It is not similar to :

How do I retrieve a textbox value using JQuery? ,
Jquery retrieve values of Dynamically created elements ,
how do i retrieve a textbox's title and name using jquery? ,

Looking for your help ..

Thanks.

  • 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-19T16:33:10+00:00Added an answer on May 19, 2026 at 4:33 pm

    You’re missing a $ sign. It should be:

    $(":text").each(function(){
        alert($(this).val());
    });
    

    You should also try to generate well-formed HTML, with attributes delimited by quote characters:

    $('<td id="'+cId+'" width="'+cWidth+'">'+cName+'</td>').appendTo('#page-wrap');
    $('<label for="'+cName+'">'+cName+'<input type="text" name="'+cName+'" id="'
        +cName+'" value="" class="text ui-widget-content ui-corner-all" /></label>')
        .appendTo('#moreItems');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating text boxes dynamically. I want to take those text box values
I'm creating a list dynamically and I need to be able to retrieve values
$(document).ready(function() { $('#somebutton').click(function() { $.get('List', function(responseJson) { $.each(responseJson, function(index, item) { var elem=$('<input type=checkbox
I've managed to Add EditText(s) dynamically and retrieve values in Android, and I got
I'm trying to retrieve mulitple checked value, which are being showed in JSP dynamically,
I'm building dynamic forms in GWT, but I'm not sure how to dynamically retrieve
I'm trying to generate a list dynamically from database. The results can be retrieved,
I´m dynamically creating an instance of a class with reflection and this works fine,
I am dynamically creating a table that contains a textbox in each cell. The
I am dynamically populating a ComboBox with an HTTPservice calling an XML file. This

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.