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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:32:34+00:00 2026-05-16T12:32:34+00:00

I am having an issue trying to post a JSON string using dojo.xhrPost to

  • 0

I am having an issue trying to post a JSON string using dojo.xhrPost to a Zend Framework Controller.

When I post the string to the server I get no data being sent. I’ve even tried just sending “A Test string”, even that is not being sent.

I’ve done a var dump to see the contents of the request but clear as day, there is no parameter or data of what I am posting. My code looks like this:

var jsonStr = dojo.toJson(values);
var xhrArgs = ({
        url:"/dojo/savedetails/",
        postData: jsonStr,
        handleAs: "text",               
        load: function(data){

            if(data == 'success'){

                //success code
               dojo.byId('edit_alert').innerHTML = '<div class="info">Your changes have been saved</div>'

            }else{

                dojo.byId('edit_alert').innerHTML = '<div class="error">We were unable to save your changes please try again.</div>';
            }

        }           

    });

    //we now post the data to the server for processing.
    var deferred = dojo.xhrPost(xhrArgs);

The contents of my var_dump($this->_request) is:

object(Zend_Controller_Request_Http)#118 (14) { ["_paramSources":protected]=>  
array(2) { [0]=>  string(4) "_GET" [1]=>  string(5) "_POST" } ["_requestUri":protected]=>  string(25) "/dojo/savedetails/" 
["_baseUrl":protected]=>  string(0) "" ["_basePath":protected]=>  NULL ["_pathInfo":protected]=>  string(25) "/dojo/savedetails/" ["_params":protected]=>
array(3) { ["controller"]=>  string(4) "dojo" ["action"]=>  string(18) "savedetails" ["module"]=>  string(7) "default" } ["_aliases":protected]=>  array(0)
{ } ["_dispatched":protected]=>  bool(true) ["_module":protected]=>  string(7) "default" ["_moduleKey":protected]=>  string(6) "module" 
["_controller":protected]=>  string(4) "dojo" ["_controllerKey":protected]=>  string(10) "controller" ["_action":protected]=>  
string(18) "savedetails" ["_actionKey":protected]=>  string(6) "action" } 

I hope that I am missing something simple however I’ve been following the documentation on dojotoolkit.org, and from their examples this should work.

I’m Using Dojo 1.3 and Zend Framework 1.9 if that helps.

Thanks,

  • 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-16T12:32:35+00:00Added an answer on May 16, 2026 at 12:32 pm

    If you use postData to pass in the content, you need to use dojo.rawXhrPost instead of dojo.xhrPost.

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

Sidebar

Ask A Question

Stats

  • Questions 503k
  • Answers 503k
  • 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 You can use DataAnnotations to override the default error messages… May 16, 2026 at 2:58 pm
  • Editorial Team
    Editorial Team added an answer With notepad++ you'll need to use \2-\1 as the replacement… May 16, 2026 at 2:58 pm
  • Editorial Team
    Editorial Team added an answer XMPP isn't a trivial protocol to implement, and I don't… May 16, 2026 at 2:58 pm

Trending Tags

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

Top Members

Related Questions

I'm trying to get twitter update_profile_image to work using OAuth. I was using curl
I'm having an issue with trying to use VB.NET and the WebRequest object to
I'm having something of an issue with trying to load externally defined classes in
I am having an issue that I can't figure out. I'm trying to run
I keep on having these same two problems. I have been trying to use
I am having an issue adding posts to LiveJournal via the xmlrpc api they
I'm trying to sell our group on using Mercurial as a source repository rather
Hey all, having an issue getting asp buttons to interact with JQuery. I'm basically
I'm trying to submit a form via AJAX and prevent a redirect after the
I have 2 dijit widget template classes and am trying to call one from

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.