1. #1
    Ext User
    Join Date
    Nov 2008
    Posts
    39
    Vote Rating
    0
    chriswesdorp is on a distinguished road

      0  

    Default [FIXED] Multipart form submit; how to get raw response data

    [FIXED] Multipart form submit; how to get raw response data


    Hi, using a multipart form (for uploading a file) the server response is written to a hidden iframe in the FileUploadField. With a listener and Events.Submit a callback can be registered to catch the response data but it is presented as resultHtml.

    What if I want the raw data returned from the server, e.g. because the servlet handling the file upload returns an XML containing a status response as well as an identifier to the uploaded data. The resultHTML property in the FormEvent contains HTML elements which are not in my response (and are probably added by the browser) in order to display but the iframe is hidden.

    I noticed several things:
    * In firefox the data (my response XML) is loaded the to iframe (using Firebug) to inspect, but the FormEvent.resultHTML is null.
    * IE triggers the FormEvent several times and the resultHTML is changed (other HTML elements as span and div are added).

    How can I get the RAW data?

    Gr. Chris

  2. #2
    Ext User
    Join Date
    Nov 2008
    Posts
    39
    Vote Rating
    0
    chriswesdorp is on a distinguished road

      0  

    Default


    It seems I can't get a response as XML. I now get HTML and parse the contents which seem to work in all browsers...

  3. #3
    Ext User
    Join Date
    Apr 2007
    Posts
    8
    Vote Rating
    0
    kevin.dewi is on a distinguished road

      0  

    Default


    I have the same problem. Is there a solution?
    I use Ext GWT 2.0.

  4. #4
    Ext User
    Join Date
    Aug 2009
    Posts
    4
    Vote Rating
    0
    calhau is on a distinguished road

      0  

    Default


    I have the same problem. how can I get the response?

  5. #5
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,241
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Set the mime type to "text/plain". With "text/html" and "text/xml" IE alters the text as it is embedded in the body of the iframe. I was able to retrieve the text and parse it:

    Code:
          addListener(Events.Submit, new Listener<FormEvent>() {
            public void handleEvent(FormEvent be) {
              String xml = be.getResultHtml();
              Document doc = XMLParser.parse(xml);
              Info.display("Action", "Size: " + doc.getFirstChild().getFirstChild().getNodeValue());
            }
          });

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar