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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:17:13+00:00 2026-05-23T14:17:13+00:00

Looping over a bunch of checkboxes SOMETIMES fails. The .each function is NOT entered

  • 0

Looping over a bunch of checkboxes SOMETIMES fails.
The .each function is NOT entered when some or all boxes are checked so I get the “no checkboxes were checked” alert even though “checked” boxes exist.

$(document).ready(function() {
  $("#submitme").click(function() {
    var urls = [];
    $("#edit :checked").each(function() {
      var obj = {};
      obj.url = $(this).val();
      urls.push(obj);
    });
    if (0 < urls.length) {
      $.post('/myurl', {urls: JSON.stringify(urls)});
    }
    else {
      alert("no checkboxes were checked!");
    }
   });
});

<div id="edit">
  <input type="checkbox" name="first"  value="first_url"/>
  <input type="checkbox" name="second" value="second_url"/>
  <button id="submitme">submit</button>
</div>

jsFiddle Example

  • 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-23T14:17:14+00:00Added an answer on May 23, 2026 at 2:17 pm

    No answer to the problem. The issue only exists in Opera so it’s browser-related.

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

Sidebar

Related Questions

I'm basically looping over a bunch of youtube video url's to get each video's
I have a bunch of big files, each file can be over 100GB, the
I see htaccess questions all over the place but I cant seem to get
I'm trying to read a file of regexes, looping over them and filtering them
Ok so i have a lil function that will get a value from a
A recent update over unversioned directories removed a bunch of files. Is there a
I have a directory with a bunch of subdirectories. MAIN_DIR\ Each sub-dir is a
I've recently switched over a rails app to a new server. For some reason,
I've been looking and looking all over the net about how to load an
I've been all over looking for a solution to this recently, and so far

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.