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 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

Related Questions

I have added some code which compiles cleanly and have just received this Windows
I've really hit a wall and am need of some help! Thankyou for reading
I have some terribly written ASP.NET code that is just not working right (go
So this is a really strange problem. I have a Java app that acts
So i just received a connection string to a Cube in our one of
I have only just started received the following error in my windows forms application
Just looking for the first step basic solution here that keeps the honest people
Just how much slower are events? I have written a streaming XML parser (that
Just what the title says, I need to change the password for an existing
just a quick question: I am a CS undergrad and have only had experience

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.