Login Register

json

Looking for a good example on making a grid display a JSON

Hey, I'm having a hard time finding an example of how to make a grid display a JSON object that I am receiving from my server. If anyone knows of any or has experience with this that would be greatly appreciated. Thanks!

JSON in an HTML template

Hello,

I would like to achieve something like this:
var Membre = some object;
and in the body of my HTML file:
Hello, Mr ${Membre.FirstName} ${Membre.LastName}

Basically, I'm fetching my data using an ajax call without any problem, but then, I don't know how to display them. I looked at widgets but this doesn't seem like the right solution... If somebody can help me on this...

Thank you.

dojo.io.frame: browser asks to save 'json' response as a file

I am using dojo.io.frame to upload the file. When the file is uploaded, server(server side code) returns response in the form of json. But when the response is returned, handler is not called, instead browser opens the file save window. Saved file has the json response in it. I dont know why browser asks to save the response as file. why handler is not getting called?

I am using following code to upload the file. File gets uploaded successfully, but the callback function isnt getting called.


dojo.io.iframe.send({
method: "post",
handleAs: "json",

a Mock JsonService for development and testing

I've worked on creating a MockJsonService for unit testing and for making development a bit more rapid and less dependent on the server side. It a fairly lengthy discussion, but I thought I would make it available to anyone who was interested:

http://blog.medryx.org/2008/06/07/a-mock-rpc-service/

-maulin

Make DropDownList lists infors in Chinese

I'm a Chinese student studying dojo.
I am making a CaseCadingDropDown , means once I have chosen CityA , all the towns of CityA will be ready in another FilteringSelect.
Well , I can do it in English now , but I don't know how to show Chinese.

We know that the JSON can't send Chinese or Japanese directly , I should change the chararters into UTF8 style.

Well , the client can get the infor of charaters from the server , but the infor is still UTF8 style!

So far as I know , the ItemFileReadStore can't get JSON with UTF8 style.
So , what shall I do?

RPC

I can hardly say that I have a problem since everything is running OK but still in FireBug I am getting odd results.

xhrGet error callback invoked when no error on IE6

I am converting some old pages to use dojo 1.1, and ran into a snag when doing cross browser testing. Everything is fine in Firefox, but fails in IE 6. The basic approach here is to invoke a php file on the server in response to user click, and have it return a JSON structure based on what it finds in the database. That JSON structure is then used to build a table in a div by DOM manipulation. Looks good, runs fast – but not in IE.

newbie dojo.data.ItemFileReadStore shows "error getting items" when assigned json data is from javascript

Hello,

I am trying to create dojo thumbnail using following syntax.

var mess = new Array();
                //getKfJasonData returns the pics in json format from javascript
                mess[0] = getKfJsonData();                 
                thmbData.data = mess[0];
                //I get correct output here in the alert
                alert ('data: ' + thmbData.data );

Dynamic tree using AJAX?

What I want to do is create a forest based on the primary key of a database and only load the rest of the data beneath a given node after it is selected/expanded. What would be the best approach for something like that?

From what I have read it sounds like I would just use AJAX to load the data into a json and then use that to create the tree. The trick is updating that json store when a tree node is selected. Do I just need to write some code to do a custom merge of the json data using onclick or is there a better way to do this?

Thanks.

json format issues

Hi i am new to dojo and javascript. I am trying to get mysql data into json format via php.
content of actual jsonfile which is actually php output. Okay so the error message I am missing a right bracket, but where?
Maybe I have just been looking at this two long. I don't know where I went wrong the brackets and braces seem to mirror each other

{items:[
{links:['first','prev',' dojoajax('dojo_tut/BookForm.php?Bsearch_next_page=2','Bsearch')','dojoajax('dojo_tut/BookForm.php?Bsearch_next_page=6','Bsearch')']},
{Data:['39','author of book','dewy1','title2']},

Syndicate content