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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:15:48+00:00 2026-06-13T07:15:48+00:00

I have code which generates markers on a Google map based on certain criteria.

  • 0

I have code which generates markers on a Google map based on certain criteria. What I’m attempting to do is generate a list next to the map which would contain the address associated with each marker that appears on the list as well as a checkbox next to each address. At the bottom of this list would be a “refine” button which would return only the results which had their checkbox selected.

My question are:

  1. How would I store the dynamically generated checkboxes and their respective address fields so that I could update and modify the selection with the refine button?

  2. How would I (or should I) actually set each checkbox to run a function on onClick which would remove the marker from the map?

  • 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-13T07:15:49+00:00Added an answer on June 13, 2026 at 7:15 am

    Create checkboxes on the fly inside a given div

    var holder = document.getElementById('holdingDiv');
    var newCheckbox = document.createElement('input');
    newCheckbox.type = 'checkbox';
    newCheckbox.id = 'holdingDiv_option' + someValueIdentifier;
    holder.appendChild(newCheckbox);
    

    To run through these checkboxes adding event handlers:

    // modify this if not just a bunch of checkboxes in a div:
    var checkboxes = holder.getElementsByTagName('input'); 
    for(var i=0; i < checkboxes.length; ++i) {
        var thisCheckBoxId = checkboxes[i].id;
        // create a listener
        var callback = function(event) {
            myGeneralHandler(i, event);
        }
        if(checkboxes[i].addEventListener) {
          checkboxes[i].addEventListener('click', callback, false);
        } else { //IE
          checkboxes[i].attachEvent('click', callback);
        }
    }
    

    Then set up myGeneralHandler to handle clicks from any checkboxes.

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

Sidebar

Related Questions

I have code which has a drop down list. And when a certain option
I have this code which generates me two images. What it does is generate
I have been building an asp.net control to generate a google map based on
I have the following code which will generate two pdf files containing plots to
I have some php files in a server which generate xml code in them.
I have code which needs to do something like this There is a list
I have code which performs query on Jboss server. It has JNDI based datasource
I have some JS code which generates the following object, return { type: some
I have this XML code which generates a button, a textview and another button,
I have inherited some legacy code which generates a ton of inline styles. The

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.