[symfony-users] Re: ExtJs JSON response

2009-05-25 Thread santail

Action executes of file upload. If that helps to find a bug.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: ExtJs JSON response

2009-05-25 Thread Leon van der Ree

My guess is your content-type.

Try keeping it text/html instead of application/json

On May 25, 10:21 am, santail  wrote:
> Action executes of file upload. If that helps to find a bug.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: ExtJs JSON response

2009-05-25 Thread Gábor Fási

Check your headers with LiveHTTPheaders or something similar: do you
also send a content-disposition: attachment one? That's what triggers
the save as dialog. If you do, change it to inline and it should fix
it.

On Mon, May 25, 2009 at 10:09, santail  wrote:
>
> There is action with next code:
>
> public function executeUpload(sfWebRequest $request)
> {
>    $this->getResponse()->setHttpHeader('Content-Type','application/
> json; charset=utf-8');
>    $json = array('success' => true);
>    return $this->renderText(json_encode($json));
> }
>
> Browser promts "Save file dialog" instead of JSON-style response after
> action execution. What is the problem ? Action is called after file
> upload.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: ExtJs JSON response

2009-05-25 Thread santail

That helps, thanks. But what the difference between these two types of
content for browser ?

On 25 май, 12:00, Leon van der Ree  wrote:
> My guess is your content-type.
>
> Try keeping it text/html instead of application/json
>
> On May 25, 10:21 am, santail  wrote:
>
> > Action executes of file upload. If that helps to find a bug.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: ExtJs JSON response

2009-05-25 Thread Gareth McCumskey
application/json is a way to specify to the browser that what is coming is a
JSON formatted sequence of data and not html to display in the browser. If
the request wasn't initiated by an ajax request then it doesn't know how to
process properly.

2009/5/25 santail 

>
> That helps, thanks. But what the difference between these two types of
> content for browser ?
>
> On 25 май, 12:00, Leon van der Ree  wrote:
> > My guess is your content-type.
> >
> > Try keeping it text/html instead of application/json
> >
> > On May 25, 10:21 am, santail  wrote:
> >
> > > Action executes of file upload. If that helps to find a bug.
> >
>


-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: ExtJs JSON response

2009-05-25 Thread Lee Bolding

This is the correct solution.

Your browser attempts to download the response as a file because it  
doesn't know what to do with the mime type application/json

If you set the headers to text/html for testing purposes you'll see  
the response as plain text in your browser

On 25 May 2009, at 06:00, Leon van der Ree wrote:

>
> My guess is your content-type.
>
> Try keeping it text/html instead of application/json
>
> On May 25, 10:21 am, santail  wrote:
>> Action executes of file upload. If that helps to find a bug.
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: ExtJs JSON response

2009-05-26 Thread Tonio

Hi,

There are pretty useful ff extension to view JSON response:

https://addons.mozilla.org/en-US/firefox/addon/10869

Tonio

https://addons.mozilla.org/en-US/firefox/addon/10869

On May 25, 3:20 pm, Lee Bolding  wrote:
> This is the correct solution.
>
> Your browser attempts to download the response as a file because it  
> doesn't know what to do with the mime type application/json
>
> If you set the headers to text/html for testing purposes you'll see  
> the response as plain text in your browser
>
> On 25 May 2009, at 06:00, Leon van der Ree wrote:
>
>
>
> > My guess is your content-type.
>
> > Try keeping it text/html instead of application/json
>
> > On May 25, 10:21 am, santail  wrote:
> >> Action executes of file upload. If that helps to find a bug.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---