Coder Social home page Coder Social logo

Comments (3)

shlurbee avatar shlurbee commented on August 23, 2024

what browser?

from gwt-front-end.

hongsudt avatar hongsudt commented on August 23, 2024

firefox.

On Mon, Jun 6, 2011 at 6:10 PM, shlurbee
[email protected]
wrote:

what browser?

Reply to this email directly or view it on GitHub:
https://github.com/cens/AndWellnessFrontend/issues/6#comment_1313014

from gwt-front-end.

shlurbee avatar shlurbee commented on August 23, 2024

The problem seems to be this:

  • When uploading a file, you must use a form post instead of an ajax request
  • The result of the form post is handled by the browser instead of javascript
  • Our server responses have content type application/json
  • Firefox automatically prompts the user to save when it receives content of type application

The strategy recommended by the GWT documentation is to set content type to text/html, which can be intercepted and parsed by all browsers. (see below) John changed the results of document/create and campaign/create to have content type html/text which seems to have fixed the problem. (deployed on mdev1)


For reference, here's the gwt info:

From: http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FormPanel.html

FormPanel

public FormPanel()
Creates a new FormPanel. When created using this constructor, it will be submitted to a hidden <iframe> element, and the results of the submission made available via FormHandler.
The back-end server is expected to respond with a content-type of 'text/html', meaning that the text returned will be treated as HTML. If any other content-type is specified by the server, then the result html sent in the onFormSubmit event will be unpredictable across browsers, and the FormHandler.onSubmitComplete(FormSubmitCompleteEvent) event may not fire at all.

Tip:
The initial implementation of FormPanel specified that the server respond with a content-type of 'text/plain'. This has been intentionally changed to specify 'text/html' because 'text/plain' cannot be made to work properly on all browsers.

from gwt-front-end.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.