try this
http://www.nabble.com/german-mutated-vowels-with-AJAX-in-iso-8859-1-environment-(cake-1.2)-td15734241.html
On Mar 14, 2:11 pm, ksachdeva <[EMAIL PROTECTED]> wrote:
> I am able to see the data now after many hit and trials. Here is what
> is happening
>
> Case 1 (not working):
> if I send json data using XmlHttpRequest which looks like this
> '{ a : 1}' then the contents of $_POST are empty.
>
> Case 2 (working):
> if I send json data using XmlHttpRequest which looks like this
> 'b = {a : 1}' then there is something in the $POST. Although what I
> see is
> that they key is 'b_' [note the underscore] and value is '{a : 1}'.
>
> Would really appreciate if some one enlighten me why this behavior.
>
> Regards & thanks
> Kapil
>
> On Mar 13, 12:33 am, ksachdeva <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Configuration : CakePHP 1.2, Windows Vista, WAMP, PHP5
>
> > I am trying to just post some json to the controller using AJAX. I can
> > see the post contents in firebug but in my action I do not see them in
> > $this->params or even $_POST.
>
> > In order to make AJAX call I am using ExtJS. Here are some snippets:
>
> > JavaScript code to make an ajax call:
>
> > var req = {
> > "Step" : "1",
> > "Supported" : "false",
> > ...... some more json data
> > };
>
> > var o = {
> > jsonData : req,
> > scope : this,
> > callback : this._loadResponse,
> > url :
> > '/MySite/mytest/determineSupport',
> > headers : {
> > 'Content-Type' : 'application/json'
> > },
> > disableCaching : false,
> > method : 'POST'
> > };
>
> > Ext.Ajax.request(o);
>
> > Firebug request log:
>
> > Host localhost
> > User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:
> > 1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
> > Accept text/xml,application/xml,application/xhtml+xml,text/
> > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language en-us,en;q=0.5
> > Accept-Encoding gzip,deflate
> > Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive 300
> > Connection keep-alive
> > X-Requested-With XMLHttpRequest
> > Content-Type application/x-www-form-urlencoded,text/
> > javascript,application/json
> > Refererhttp://localhost/mysite/timtim/
> > Content-Length 127
> > Cookie CAKEPHP=iqo58vi7v718i67qdn196tj6j1; fontSize=100;
> > SESS6d22729b2c65d6b5d954ac8e39225858=mdch2au308dnbl28ioovq7r1e6;
> > use_remote=1; debug_session_id=103695224; debug_start_session=POST;
> > ZendDebuggerCookie=192.168.1.112%2C192.168.206.1%2C192.168.153.1%2C127.0.0.1%3A10000%3A0||
> > 09C|77742D65|103695224
> > Pragma no-cache
> > Cache-Control no-cache
>
> > I have seen this thread where similar problem was asked but it did
> > not
> > helphttp://groups.google.com/group/cake-php/browse_thread/thread/29b6f5ca...
>
> > What am I missing ?
>
> > In brief, I want to submit jsondata to an action in a controller. How
> > do I get this data in the controller/action code ?
>
> > Regards & thanks
> > Kapil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---