This is just guessing, but because you don't use AJAX but instead an iframe, the result is send to a browser-window (even if it is invisible).
And a browser-window can't make sense of the json-output. If working with iframes, you simply return a normal website. You can if you want render json into it, and use JS to grab that once it is finished, and eval it. But how that works with your jquery-plugin I don't know, because I don't know that. Diez -----Ursprüngliche Nachricht----- Von: "zaf" <[EMAIL PROTECTED]> Gesendet: 22.10.08 18:11:33 An: TurboGears <[email protected]> Betreff: [TurboGears] Re: Uploading file in an Ajax form Alright so apparently it's not working that well. Basically I have the save method in my controller that is like this : @expose("json") def save(param1 = "", param2 = "", fileparam =""): #do stuff return dict = (jsonmsg = jsonmsg) Now if I send the form without anything in the fileupload input it works fine and I get a nice little javascript popup with the content of jsonmsg in it. But if I send the form with a file in the file input, the pop up doesn't show up and instead I get my browser's "open" dialog saying that I "you have chosen to open save which is a :application/json from : http://localhost" Now why it does this is beyond me, so can someone explain please ? the link to the jquery plugin is in the previous message. Thanks Tom On Oct 22, 2:34 pm, zaf <[EMAIL PROTECTED]> wrote: > forgot to post the link to that jquery plug in:http://malsup.com/jquery/form/ > In case anyone was wondering where to find it. > > On Oct 22, 2:32 pm, zaf <[EMAIL PROTECTED]> wrote: > > > hey guys thanks for all those suggestions, > > Turns out there is a jquery form plugin that handles that. I think it > > uses iframes but to be honest I didn't really look inside that long. > > All I know is that it works. > > As I've been using jquery from the start this suits me fine. I don't > > know how did the easy_install packaging for jquery in Turbogears but > > maybe this could be added (as well as a newer version of jquery). > > it's just a suggestion. > > Is Mochikit going to remain the default JS library for TurboGears or > > are there any plans about changing that ? > > Anyway, thanks again. > > Tom > > > On Oct 21, 9:06 pm, "Lukasz Szybalski" <[EMAIL PROTECTED]> wrote: > > > > On Tue, Oct 21, 2008 at 1:42 PM, Diez Roggisch <[EMAIL PROTECTED]> wrote: > > > > >>If we could get AJAX with noiframe to do what this "fancyuploader" > > > >>does that would be great. > > > > > As it has been said several times before: that's technically not > > > > possible. And I personally don't see any problems with the > > > > iframe-solution, in my experience it's cross-browser enough and robust. > > > > Wrapping this up as a nice widget sure is a good idea though. > > > > ok. A widget would work. > > > > Thanks, > > > Lucas _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000066 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

