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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:44:33+00:00 2026-05-24T22:44:33+00:00

I want to identify (alert) each select/option value, in each Group. But I need

  • 0

I want to identify (alert) each select/option value, in each Group.
But I need a push…

<script src="jquery.mobile/jquery.js"></script>

<div  id="groupA" class="preGroups">

    <div id="section-A1">
    <input name="SRPR1"  type="text">
        <select name='ACTC' id='preAction' > 
            <option value='007'>Stolen</option> 
            <option value='008'>Tampered</option> 
        </select>
    </div>

    <div id="section-A2">
    <input name="SRPR1"  type="text">
        <select name='ACTC' id='preAction' > 
            <option value='007'>Stolen</option> 
            <option value='008'>Tampered</option> 
        </select>
    </div>

</div>

<div  id="groupB" class="preGroups">

    <div id="section-B1">
    <input name="SRPR1"  type="text">
        <select name='ACTC' id='preAction' > 
            <option value='007'>Stolen</option> 
            <option value='008'>Tampered</option> 
        </select>
    </div>

    <div id="section-B2">
    <input name="SRPR1"  type="text">
        <select name='ACTC' id='preAction' > 
            <option value='007'>Stolen</option> 
            <option value='008'>Tampered</option> 
        </select>
    </div>

    <script>
$(document).ready(function()
{    
        // iterate through each group in groups
        groups = $('div[id^="group"]'); 
        $.each(groups, function(key, group) {
            fnValidateGroup($(group));      
        });

        // validation for reason codes in a specific Group
        function fnValidateGroup(currentGroup){

            selects = $(currentGroup).find('select[name="ACTC"]'); 
            $.each(selects, function(key, activity) {
                // show me activity seelctec in each case
                alert($(activity).val) ;
            });
        }
});     



</script>

*edit *
output should look like:

new Group
007
008
new Group
007
007

*edit *
Here is the answer I came to with your help…

$(document).ready(function()
{    
        // iterate through each group in groups
        groups = $('div[id^="group"]'); 
        $.each(groups, function() {
            console.log("New Group");
            fnValidateGroup(this);      
        });

        // validation for reason codes in a specific Group
        function fnValidateGroup(currentGroup){

            selects = $(currentGroup).find('select[name="ACTC"]'); 
            $.each(selects, function(key, activity) {
                // show me activity seelctec in each case
                console.log(($(activity)).val());
            });
        }
});     
  • 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-24T22:44:35+00:00Added an answer on May 24, 2026 at 10:44 pm

    Something like this should work. What have you tried?

    $("select").each(function(){
        alert($(this).attr("name"));
        $(this).children("option").each(function(){
            alert($(this).html());
    
        });
    });
    

    Or if you want to alert them in pairs (wasn’t sure based on your question)

     $("select").each(function(){
            var selectName = $(this).attr("name");
            $(this).children("option").each(function(){
                alert(selectName + " " + $(this).html());
    
            });
        });
    

    Here’s with your group validation

    var groups = $("div[id^='group']");
    groups.each(function(){
        var thisGroup = $(this).attr("id");
        $(this).find("option").each(function(){
             alert(thisGroup + " " + $(this).val());
    
        });
    
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to identify if a PHP script is being called inside an iframe
looking for some help please with the JQuery CSS selector. I want to identify
I want identify all mouse click event in PreTranslateMessage, but when I use WM_LBUTTONDOWN
I want to identify ioncube encoded PHP files through a script. I see some
I want to identify specific mysql db column value using timer. For example, I
I want to identify from where a visitor coming to my webpage.Is there anyways
I want to identify disk in c++ in my windows application. For example: I
I want to identify an object and draw a shape around it ... I
I'm building a C# application, and I want to identify users by their username.
I want to quickly identify if a key is present in an array, to

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.