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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:48:20+00:00 2026-06-15T19:48:20+00:00

Using plain, native Javascript (no jQuery or other framework answers please), how does the

  • 0

Using plain, native Javascript (no jQuery or other framework answers please), how does the response part of an AJAX call get processed and formatted before being sent back to the requesting script?

I have been looking for this answer and cannot seem to find it in the many searches I have performed. I would like to see an example, and not one focusing on the POST or GET variable access. I want to know how to respond to the script.

  • 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-15T19:48:21+00:00Added an answer on June 15, 2026 at 7:48 pm

    In PHP:

    header( 'Content-Type: application/json' );
    $jsonResponse = array("response" => "Good job.");
    echo json_encode($jsonResponse);
    

    Part of an AJAX call is the function listening for the response – similar to how an HTTP request has your browser waiting for a webpage response. In this case the headers indicate the resulting data is in json format. If you do this totally by hand you will get a standardized text response which you will need to parse and package into javascript objects (Which you can do because javascript’s associative array syntax for objects makes it straightforward to set object properties with names pulled from strings.)

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

Sidebar

Related Questions

I am using plain JavaScript on my project. How can I get the value
When using plain C in iPhone development, does the compiler place the variables declared
I have an event handler set up using plain javascript like this: myElement.addEventListener('drop', handleDrop,
How to strip off HTML tags from a string using plain JavaScript only, not
Since Intellij does not yet support the Play-Scala-Template-Engine I was thinking about using plain
This is not a question about a specific framework. I am using plain php
I am creating a website using JavaScript. The purpose of the JS part is
With using plain C preprocessor macros, is it possible to create something like: INIT_BASE(0x100)
I'm writing an Adobe AIR app using plain HTML which needs to upload photos
Hi im using sqlalchemy on a db2 table with 500k rows. using plain sql

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.