"This change failed to remedy the problem"

As it shouldn't...

because the bottom line is: the browser makes the request and the
browser receives the request, and when the browser sees "text/json"
come back from the server, it has no idea what to do with it so it
prompts to download the file....

this needs to be fixed on the server side, either the calling page
needs to set the proper/correct MIME type, ** or ** you can write your
own server side code (with the proper MIME type) that in turn calls
the bad one, kind of like a proxy... that way your jQuery will work
without needing the original page changed


On Oct 12, 8:36 am, Jim <stapleton...@gmail.com> wrote:
> On Oct 10, 9:16 am, Jim <stapleton...@gmail.com> wrote:
>
>
>
> > On Oct 9, 8:50 pm, MorningZ <morni...@gmail.com> wrote:
>
> > > it's supposed to be "application/json", not "text/json"..... set the
> > > content type properly in your server side code and you'll be fine...
> > > "text/plain" will work as well
>
> > After some further searching, I found this section of code in the
> > jQuery library. If I modify the accepts:{... json: ...} line to:
> > 'json: "application/json, text/javascript,text/json",' that should
> > work as well, right? (Sorry, won't actually get to test it until
> > Monday, and was hoping to get some idea of the feasibility of the
> > route before then).
>
> > jQuery.extend({
> >   //...
> >         ajaxSettings: {
> >  //...
> >                 accepts: {
> >                         xml: "application/xml, text/xml",
> >                         html: "text/html",
> >                         script: "text/javascript, application/javascript",
> >                         json: "application/json, text/javascript",
> >                         text: "text/plain",
> >                         _default: "*/*"
> >                 }
> >         },
>
> This change failed to remedy the problem.
>
> -Jim Stapleton

Reply via email to