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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:24:40+00:00 2026-05-13T18:24:40+00:00

If I have a few checkboxes like the following: <input type=checkbox onchange=foo(bar); /> Bar

  • 0

If I have a few checkboxes like the following:

<input type="checkbox" onchange="foo(bar);" /> Bar

Will the foo(bar); function only be called when the checkbox is checked on/off by a click or keypress (what I want) or if I progromatically check/uncheck a lot of checkboxes with a select/unselect alll button, will it then call the onchange function for all of the checkboxes (what I don’t want)?

And will all browsers have the same behavior?

  • 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-13T18:24:40+00:00Added an answer on May 13, 2026 at 6:24 pm

    Internet Explorer (at least the old ones) doesn’t fire the “change” event until the checkbox loses focus. Try using “onclick” instead.

    The callback won’t be called if your code changes the “checked” status ([edit] except in cases as described by Mr. Bouman’s answer)

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

Sidebar

Related Questions

Here's the scenario: I have a contact form with few checkboxes: <input type=text name=cola[]
I have a few checkboxes representing people. Something like this: [ ] George [
I have made a Win Form and have a few controls like checkboxes, radio
I have a list of objects, each with a few fields, like this: function
i have an app that has a few checkboxes in the settings and then
I have a view with a few checkboxes that can be selected or unselected.
I have a list a simple dialog box which contains a few checkboxes, I
i have form in drupal which uploads images and has got few checkboxes in
I have a set of checkboxes and have disabled few which I want to
I have a JTable with few columns that are painted as checkboxes. What I

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.