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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:29:28+00:00 2026-05-16T10:29:28+00:00

var selValues = {}; selValues[‘234’] = $(‘#asd’).val(); selValues[‘343’] = function () { var el

  • 0
var selValues = {};
selValues['234'] = $('#asd').val();
selValues['343'] = function () { var el = ''; $('#asd input[@type=checkbox]:checked').each(function() { el += $(this).val() + '|'; }); return el; } };

here’s the explanation:

im creating a key-value array where it extracts different values from DOM objects. The last array that you see in the example actually tries to extract checked items in a checkbox list. I tried to delegate the loop and return a delimited string of all checked values, but it’s not working.

  • 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-16T10:29:29+00:00Added an answer on May 16, 2026 at 10:29 am

    A mapping is probably a better solution here:

    var el = $('#asd input:checkbox:checked').map(function(){
        return $(this).val();
    }).get().join('|');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

function sendValues() { var str = $(#ryan_m).serialize(); var response = $('input[name=product[]]:checked').val(); $.ajax({ url: /post.php?avoidcache='
function sendValues() { var str = $(#ryan_m).serialize(); var response = $('input[name=brand[]]:checked').val(); $.ajax({ url: /trying1.php?avoidcache='
In this code: <?php class Foo { var $value; function foo($value) { $this->setValue($value); }
I currently have this script : function addConsultant() { var sheet_staffing = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(Staffing); var
I have this Google Bar Chart: function drawChart() { var data = new google.visualization.DataTable();
<script language=JavaScript type=text/javascript> var theBar = createProgressBar(document.getElementById('progress-bar')); var value; function resetValue() { value =
Why doesn't this work? function sendDuesReminder() { var paid = 3; var name =
var ref1 = new Firebase(http://gamma.firebase.com/myuser/123,456); ref1.set(123,456); var on1 = ref1.on(value, function(snapshot) { console.log(snapshot.val()); });
var Foo = Foo || {}; Foo.Controller = (function ($) { var $page =
var fruit = [apple,pear,pear,pear,banana]; How do I remove all pear fruit from this array?

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.