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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:59:49+00:00 2026-05-28T16:59:49+00:00

My app has a form which uses checkboxes to sort results by type and

  • 0

My app has a form which uses checkboxes to sort results by type and area. There are 2 fieldsets, one for the types and one for the areas.

The area checkboxes are linked to areas of an imagemap so it too can be used to select multiple areas to sort by.

I have this javascript:

This links the area checkboxes and the areas of the imagemap so they both act as form inputs

    var $area = $('area');
    $area.click(function(){
        var $checkbox = $('#' + $(this).data("areanum"));
        $checkbox.attr('checked', !$checkbox.attr('checked')).button('refresh');
    });
    $('label').click(function () {
        $area.filter('[data-areanum="' + $(this).attr('for') + '"]').trigger('click');
        return true;
    });     

This breaks the type checkboxes (they won’t register as being checked when the form is submitted), unless I change the bit:

        $('label').click(function () {
            $area.filter('[data-areanum="' + $(this).attr('for') + '"]').trigger('click');
            return false;
        });

to

        $('label').click(function () {
            $area.filter('[data-areanum="' + $(this).attr('for') + '"]').trigger('click');
            return true;
        });

(changed the last line to return true)

But this makes the checkboxes difficult to select, they respond to a single click if the tick area is clicked but only respond to a double click if the checkbox label is clicked.

I hope this makes sense, if any clarification is needed I’ll try to word the problem better.

Thanks for any help.

  • 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-28T16:59:50+00:00Added an answer on May 28, 2026 at 4:59 pm

    I think you don’t need the label click handler at all because you are just toggling the checkbox checked property by triggering the area click handler which will be taken care by label’s default behavior itself when it’s for attribute is set to the checkbox id.

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

Sidebar

Related Questions

I'm developing an app which has a large amount of related form data to
I have an MDI WinForms app in which the MDI parent form has a
Good day, My app has authorization form (SigninController) which is loaded in AppDelegate, and
I have a JSF/Seam web app which has a page with a form which,
I have a Windows Form application. Version 1 of my app has been released
I have a winforms app and the main (and only) form has several buttons.
My app has a DataGridView object and a List of type MousePos. MousePos is
My app has several buttons which trigger different events. The user should NOT be
My Django app has a Person table, which contains the following text in a
hi all i am making an app which uses gdata apis . i have

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.