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

  • Home
  • SEARCH
  • 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 224109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:17:09+00:00 2026-05-11T19:17:09+00:00

I just received some really great help today with a prior jQuery problem and

  • 0

I just received some really great help today with a prior jQuery problem and figured since my luck was running that maybe I could also get some help with some checkboxes. Can someone please tell me what I am doing wrong?

Thanks!

The checkboxes are correctly echoing the database bool values but when I submit the changed values, an alert() telles me that they are undefined.

        else if (item.field == "admCustRptDly" && item.value == "1")
        {
          $('#admCustRptDly').attr('checked', true);
        }

        else if (item.field == "admCustRptSumm" && item.value == "1")
        {
          $('#admCustRptSumm').attr('checked', true);
        }

        else if (item.field == "admCustRptDtl" && item.value == "1")
        {
          $('#admCustRptDtl').attr('checked', true);
        }

<tr>
    <td class="admMarker">Daily<input type="checkbox" id="admCustRptDly" name="admCustRptDly" class="admChkbx"></td>
    <td class="admMarker">Summary<input type="checkbox" id="admCustRptSumm" name="admCustRptSumm" class="admChkbx"></td>
    <td class="admMarker">Detail<input type="checkbox" id="admCustRptDtl" name="admCustRptDtl" class="admChkbx"></td>
</tr>

$(function() {   $('.error').hide();
    $('input.text-input').css({backgroundColor:"#FFFFFF"});
    $('input.text-input').focus(function(){
        $(this).css({backgroundColor:"#FFDDAA"});
    });  
    $('input.text-input').blur(function(){
        $(this).css({backgroundColor:"#FFFFFF"});
    });

      $(".admCustBtn").click(function()
    {       // validate and process form
            // first hide any error messages
        $('.error').hide();



          var admCustRPSecPhone =
    $("input#admCustRPSecPhone").val();
          var admCustRptDly =
    $("checkbox#admCustRptDly").val();  
    var admCustRptSumm =
    $("checkbox#admCustRptSumm").val();
          var admCustRptDtl =
    $("checkbox#admCustRptDtl").val();

            var dataString =
        'admCustID='+ admCustID +
        '&admCustRptDly='+ admCustRptDly +
        '&admCustRptSumm='+ admCustRptSumm +
        '&admCustRptDtl='+ admCustRptDtl;

            alert (dataString);return false;

            $.ajax({
          type: "POST",
          url: "body.php?action=admCustomer",
          data: dataString,
          success: function(){
            alert( "Success! Data Saved");
          }
         });
        return false;   }); });
  • 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-11T19:17:10+00:00Added an answer on May 11, 2026 at 7:17 pm

    Your selectors for the checkboxes are not correct.

      var admCustRPSecPhone = $("input#admCustRPSecPhone:checked").val() == 'on';
      var admCustRptDly = $("input#admCustRptDly:checked").val() == 'on';  
      var admCustRptSumm = $("input#admCustRptSumm:checked").val() == 'on';
      var admCustRptDtl = $("input#admCustRptDtl:checked").val() == 'on';
    

    You could also use something like:

      var admCustRptDly = $("#admCustRptDly:checkbox:checked").val() == 'on';
    

    This will set the values to true/false depending on whether the checkbox is checked or not.

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

Sidebar

Ask A Question

Stats

  • Questions 204k
  • Answers 204k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Visual Studio has a feature called Edit and Continue. This… May 12, 2026 at 8:43 pm
  • Editorial Team
    Editorial Team added an answer I assume you want to download images from Internet? You… May 12, 2026 at 8:43 pm
  • Editorial Team
    Editorial Team added an answer How about: $query = "SELECT * FROM `TableA` WHERE `field1`… May 12, 2026 at 8:43 pm

Related Questions

I have some terribly written ASP.NET code that is just not working right (go
I basically have 3 layers ( Window > Scene > View ) that each
I'm looking for the best method to parse various XML documents using a Java
I'm not familiar with ADO.NET Data Services but it looks usable. All I need

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.