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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:27:17+00:00 2026-06-13T11:27:17+00:00

I am generating dynamic radio buttons from an array being returned from a service.

  • 0

I am generating dynamic radio buttons from an array being returned from a service. Each item being returned contains address data. I know how to get the value fro the data, but how can I get all the values from the item that’s selected? Here’s what I have so far:

function showAddresses(item) {
    window.addNo2 = item.streetno;
    window.addStr2 = item.streetname;
    window.addCity2 = item.city;
    window.addSt2 = item.state;
    window.addZip2 = item.zip;
    window.latLong2 = item.latlng;
    $('#multiAdds').show();
    $('#results').append('<p><input type="radio" name="multiAdds" class="radioButton" onclick="getChecked()" value="' + latLong2 + '">' + addNo2 + ' ' + addStr2 + </p>');
}

function getChecked(){
    var latLong2 = $("input[name=multiAdds]:radio:checked").val();
    getJurisdictionMulti(latLong2, addNo2, addStr2, addCity2, addSt2, addZip2);
}

I basically need to be able to grab all the associated address data from the selected radio button and create separate variables with them to be able to pass into my getJurisdictionMulti() function.

  • 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-13T11:27:18+00:00Added an answer on June 13, 2026 at 11:27 am

    You can use HTML-5 data-* Attributes for such cases..
    Here is a simple case( Rough Example) , which can still be optimized..

    Let’s call this attribute data-custom

    var custom =  latLong2 + ',' + addNo2 + ',' + addStr2 + ',' + addCity2
                 + ',' + addSt2 + ',' + addZip2 ;
    $('#results').append('<p><input data-custom="' + custom + '" type="radio" name="multiAdds" class="radioButton" onclick="getChecked()" value="' + latLong2 + '">' + addNo2 + ' ' + addStr2 + </p>');
    
    
    function getChecked(){
        var values = $("input[name=multiAdds]:radio:checked").data('custom').split(',');
        var latLong2 = values[0] ;
        var addNo2 = values[1] ;
        var addStr2 = values[2] ;
        var addCity2 = values[3] ;
         var addSt2 = values[4] ;
        var addZip2 = values[5] ;
        getJurisdictionMulti(latLong2, addNo2, addStr2, addCity2, addSt2, addZip2);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am generating editable data grids from tables using dynamic data, however, i am
I am generating an email with dynamic content from a Haml template which parses
I am using the rmagick gem for generating dynamic images from a controller. The
I'm having a problem generating dynamic links to items from my code. Code that
I have an MVC application generating a series of radio buttons based on a
I'm generating dynamic HTML inside Delphi. I have no problem displaying UTF-8 strings inside
I need to serve static swf using express framework generating dynamic view similar to:
Should a highly dynamic website that is constantly generating new pages use a sitemap
Generating normal columnar data in excel file is quite easy but does any one
When generating dynamic content, which way is better to simply create the HTML and

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.