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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:26:17+00:00 2026-06-17T19:26:17+00:00

The bit that sends the data out on a button click: $.ajax({ type: POST,

  • 0

The bit that sends the data out on a button click:

$.ajax({
    type: "POST",
    url: "<?php echo base_url(); ?>coformation/appoint/",
    data: {
            "director":director.attr('checked'),
            "shareholder":shareholder.attr('checked'),
            "secretary":secretary.attr('checked'),
            "firstname":firstname.attr('value'),
            "lastname":lastname.attr('value'),
            "birthday":birthday.attr('value'),
            "birthmonth":birthmonth.attr('value'),
            "birthyear":birthyear.attr('value'),
            "occupation":occupation.attr('value'),
            "nationality":nationality.attr('value'),
            "security1":security1.attr('value'),
            "securityletters1":securityletters1.attr('value'),
            "security2":security2.attr('value'),
            "securityletters2":securityletters2.attr('value'),
            "security3":security3.attr('value'),
            "securityletters3":securityletters3.attr('value'),
            "residentialaddress":residentialaddr.text(),
            "serviceaddress":serviceaddr.text()
          },
    success: function(response) { 
            alert(response.message);
    },
    dataType: "json"
});

But when i var_dump($_POST) in the target URL, it appears that this procedure sends out only 2 fields:

array (size=2)  'residentialaddress' => string 'XXX' (length=34)  'serviceaddress' => string '' (length=0)

What could be the problem?

  • 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-06-17T19:26:18+00:00Added an answer on June 17, 2026 at 7:26 pm

    you are posting attributes there attr()..please go throu the link to see what attr actually does..

    you can even try doing

    console.log(director.attr('checked'));  //which you 'll notice that this is not you want
    
     "director":director.attr('checked'),....
    

    this send either true or false..

    that should be

     "director":director.val(),"shareholder":shareholder.val(),....
    

    val() gives you the value of checked element if checkbox or radio .. text if textbox…. i think this is what you want

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

Sidebar

Related Questions

So I've been trying to create a bit of code that sends data on
I'm a bit worried if this function sends emails that can be recognized correctly
I have a bit of code that fits theoretical prediction to experimental data, and
I have an small ASP.NET application that reads data from a table and sends
I am a bit confused right now. I have a J2ME app that sends
What method would you use to determine if the the bit that represents 2^x
I am little bit confuse that I am showing images through css it's working
I have a 32-bit application that must run on a Windows x64 server using
I know my question reads a bit like that 'how much wood can a
Part of my table design is to include a IsDeleted BIT column that is

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.