Login Register

xhr

xhrPost urlencoding

I am using version 1.1.0.
Problem:
Function xhrPost is makeing an urlencoding of the content before sending it.

Example:
dojo.xhrPost({
url: "/portal/trlService",
handleAs: "xml",
headers:{"SOAPAction":""},
content:{"mytest":"<"},
contentType: "text/xml;charset=iso-8859-1" });
};

Output from the browser:

POST /portal/trlService HTTP/1.1
Accept: */*
Accept-Language: en-US,sv;q=0.5

Problem with a global variable; using xhr and deferred

First, what does my prog do?

Maximum Simultaneous AJAX requests – browser limitation

Hi All,
I am working on a screen which has several grids and charts that need to refresh at a fixed interval.
The initial design involves 1 large AJAX request to fetch all the data for the entire screen. But as expected the JSON is very large and too unwieldy to handle. As an alternative we decided to have 5 AJAX requests instead of one that will be fired together to fetch data from the server.

Data to Server as Json how ?

Hi

I am using Dojo 1.1/IE6 i would like to know how can i send JSON data from the client to the server using dojo
also i am using a servlet at the server side.

Code Example for both would be really helpful, i would also like to know that can we create a new store programatically and store values into it and send it to server as JSON.

an example would be the user selects a number of fields and i want to keep adding his selection to a store and just POST the store to the server.

Is it possible .

Thanks

Dino

How to create a tree from Database

Hi

I am trying to populate the treaa directly from the database Oracle 9i
is this possible ?

please help also i thought of using an XHR request to a servlet which fills a arraylist of the data and sends it back as JSON but then how will i convert this to a Store which i can feed to the tree.

please help

Dino

xhr question

I want to be able to pass a different parameter everytime xhr is called. In the example -> targetcontainer is the param.
var kw = {
url: "myprogram.php",
load: function(data){
dojo.byId(targetcontainer).value = data;
},
error: function(data){
console.debug("An error occurred: ", data);
},
timeout: 2000,
form: "myForm"
};

There is a simple way in dojo.

Inconsinstent behavior of dojo.xhrPost vs dojo.io.iframe.send

When posting a form with xhrPost, dojo strips away all buttons values, and this is a documented design choice. My application needs the value of the clicked button to be sent along the rest of the form, so I worked around dojo by adding the value to the content dictionary you can pass to xhrPost: it works fine because dojo strips the button values before merging it with the content dictionary.

DataStore and FilteringSelect

My problem is this: I'm having difficulty taking the JSON data I receive from a Servlet after transforming it from JSON text to a JSON Object and using it as a dojo.data.ItemFileReadStore data store in a dijit.form.FilteringSelect. Please see below for a detailed description of the problem.

Debugging suggestions?

In my code (see below), I make an AJAX call. Firebug tells me "Error: Bad http response code: 0" and the page reloads. If I step through the code, it works, i.e. no errors, and then the page reloads. The server-side code is returning only headers and Apache is returning a 200 return code.

1. Why is my page reloading?
2. Any suggestions on tracking down this heisenbug?


function sendFNDdata(pressedBtn) {
var myresponse;
var vargetFNDdata = {
url: "cgi-bin/PortSim/getFNDdata.pl",
handleAs: "text",
content: { value: pressedBtn },

Syndicate content