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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:29:40+00:00 2026-05-18T06:29:40+00:00

Hello I am a newbie working with jQuery and Ajax. I am trying submit

  • 0

Hello I am a newbie working with jQuery and Ajax. I am trying submit data to the server using Jquery POST method. And the data that I am passing is a string. Now I am unable to understand how do I pass the data and how do I retrieve the data. I have tried searching for articles for my problem, but I have found none. I believe my problem is very basic.

if (1)//validateStep(step)
{
if(step==1)
{
var data = document.getElementById('hiddenContact').value;
$.post('/callcenter/admin/postContacts', data);
}
}

Now I’ll post the code for my postContacts action, which isn’t a big thing.

function postContacts()
{
$this->autoRender = false;
echo '<script>console.log("post contacts");</script>';
}

But I am confused as to how the data has to be retrieved. Any help is appreciated. I am using cakePHP, so I have had to use autoRender=false; which makes the view optional.

  • 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-18T06:29:40+00:00Added an answer on May 18, 2026 at 6:29 am

    With jQuery post you can define a callback function which is executed when the data is returned:

    $.post('/callcenter/admin/postContacts', data, function(returnedData) {
        // do something here with the returnedData
        console.log(returnedData);
    });
    

    The data should be in the form:

    {name: 'value', anotherName: 'another value'}
    

    which equates to the post names on the PHP end accessible in plain PHP like this:

    echo $_POST['name'];           # prints "value"
    echo $_POST['anotherName'];    # print "another value"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I am working with a simulator that uses rcS scripts to boot, this
Hello , I am currently working on the student association's website. The student's association
Hello we have an SQL server application running over a low bandwith connection. We
I am a newbie with a problem working with Django-nonrel on Google App Engine.
(Rails newbie) Hello! I am feeling like I am reusing a lot of my
hello i'm newbie in sql (postgresql) i have 2 tables as result of 2
Hello i am newbie in blackberry app. development.I need my applications to run on
Hello I'm a newbie web programmer. My background is writing Windows applications with sql.
I'm a newbie to Java and I'm confused about something: In the simple hello
I am newbie to Kohana (v3 used). When I run the Hello World example.

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.