[Dojo-interest] Send json STRING to server not serialized
Peter Daalder
pdaalder at 2coolboarders.com
Tue Jan 30 09:24:33 MST 2007
Then I have question, how to proceed if you want to call a function that is
stored on the server and is passed back to the browser.
So in my "load: ..." I want to call a function that I don't want to store in
the browser, only when somebody has authenticated he/she can execute that
function.
I'm going to work on this later on, however I was hoping to get some
directions (google didn't return a thing yet). So what I'm trying is to
validate the string as a function. Cheers,
Peter
On 1/30/07, romain garcon <romaingar at gmail.com> wrote:
>
> Whaoo. Thanks to all. I've tried dojo.json.serialize(jsonObj) and it's
> work !
> thanks Shane & Matthew I paid you a beer the next time you will come in
> France. ;-)
>
> On 1/30/07, Shane O'Sullivan <shaneosullivan1 at gmail.com> wrote:
> >
> > you can use dojo.json.serialize(jsonObj) to serialize a JSON object
> >
> > Shane
> >
> > On 30/01/07, mengel at notes.cc.sunysb.edu <mengel at notes.cc.sunysb.edu>
> > wrote:
> > >
> > >
> > > You also need to change the mimetype to text/html or other text type.
> > >
> > > Matthew Engel
> > > Senior Programmer/Analyst
> > > State University of New York at Stony Brook
> > > mengel at notes.cc.sunysb.edu
> > >
> > >
> > > *"romain garcon" <romaingar at gmail.com>*
> > > Sent by: dojo-interest-bounces at dojotoolkit.org
> > >
> > > 01/30/2007 10:01 AM Please respond to
> > > dojo-interest at dojotoolkit.org
> > >
> > > To
> > > dojo-interest at dojotoolkit.org cc
> > >
> > > Subject
> > > Re: [Dojo-interest] Send json STRING to server not serialized
> > >
> > >
> > >
> > >
> > >
> > >
> > > Ok,
> > > So the only thing that i have to do is to use the javascript
> > > toString() function with my json Object....
> > > I am going to try.
> > > Thanks.
> > >
> > >
> > > On 1/30/07, *mengel at notes.cc.sunysb.edu* <mengel at notes.cc.sunysb.edu><
> > > *mengel at notes.cc.sunysb.edu * <mengel at notes.cc.sunysb.edu>> wrote:
> > >
> > > When you create it it's serialized. Your creating it as a JSON
> > > object, so it's being handled as a JSON object. You need to convert it to a
> > > string before sending it to send it as a string.
> > >
> > > Matthew Engel
> > > Senior Programmer/Analyst
> > > State University of New York at Stony Brook*
> > > **mengel at notes.cc.sunysb.edu* <mengel at notes.cc.sunysb.edu>
> > >
> > > *"romain garcon" <**romaingar at gmail.com* <romaingar at gmail.com> *>*
> > > Sent by: *dojo-interest-bounces at dojotoolkit.org *<dojo-interest-bounces at dojotoolkit.org>
> > >
> > > 01/30/2007 09:52 AM
> > > Please respond to*
> > > **dojo-interest at dojotoolkit.org * <dojo-interest at dojotoolkit.org>
> > >
> > >
> > > To
> > > *dojo-interest at dojotoolkit.org* <dojo-interest at dojotoolkit.org> cc
> > >
> > > Subject
> > > [Dojo-interest] Send json STRING to server not serialized
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi,
> > > I would like send a json object to my server, but if i put the object
> > > inside the content params, dojo serialize it. like this :
> > > var jsonObj={val1:'toto',val2:'tata'};
> > > bindArgs = {
> > > url: "http://...",
> > > method: "post",
> > > content: jsonObj,
> > > mimetype: 'application/json'
> > > }
> > > var req = dojo.io.bind(bindArgs);
> > >
> > > // in firebug 'request' tab.
> > > val1='toto'&val2='tata'
> > >
> > > But I need to send a object in string "{val1:'toto',val2:'tata'}" to
> > > my server, not serialized. How can I do that ?
> > > In fact I don't know how use json in duplex mode....
> > > Thanks.
> > >
> > > _______________________________________________
> > > Dojo FAQ: *http://dojo.jot.com/FAQ * <http://dojo.jot.com/FAQ>
> > > Dojo Book: *http://manual.dojotoolkit.org/DojoDotBook *<http://manual.dojotoolkit.org/DojoDotBook>
> > > *
> > > **Dojo-interest at dojotoolkit.org* <Dojo-interest at dojotoolkit.org> *
> > > **http://dojotoolkit.org/mailman/listinfo/dojo-interest *<http://dojotoolkit.org/mailman/listinfo/dojo-interest>
> > >
> > >
> > > _______________________________________________
> > > Dojo FAQ: *http://dojo.jot.com/FAQ* <http://dojo.jot.com/FAQ>
> > > Dojo Book: *http://manual.dojotoolkit.org/DojoDotBook
> > > Dojo-interest at dojotoolkit.org*<http://manual.dojotoolkit.org/DojoDotBookDojo-interest@dojotoolkit.org>
> > > *
> > > **http://dojotoolkit.org/mailman/listinfo/dojo-interest *<http://dojotoolkit.org/mailman/listinfo/dojo-interest>
> > >
> > > _______________________________________________
> > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > Dojo-interest at dojotoolkit.org
> > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > >
> > >
> > > _______________________________________________
> > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > Dojo-interest at dojotoolkit.org<http://manual.dojotoolkit.org/DojoDotBookDojo-interest@dojotoolkit.org>
> > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > >
> > >
> > >
> >
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > Dojo-interest at dojotoolkit.org
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> >
> >
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070130/a6b3e052/attachment.html
More information about the Dojo-interest
mailing list