Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    File Upload with IFrame callback handling

    Hi, we use smartgwt 2.5

    Im doing file uload using UploadItem. The form action is redirected to IFrame created like this:
    Code:
    		HTMLPane pane = new HTMLPane();
    		pane.setOverflow(Overflow.HIDDEN);
    		pane.setID("fileUploadFrame");
    		pane.setContents("<IFRAME NAME=\"fileUploadFrame\" style=\"width:0;height:0;border:0\"></IFRAME>");
    I couldnt get the HTML pane to draw IFame, but that is not the issue.

    Then i redirect the form to use the iFrame for submit:
    Code:
    		form.setTarget("fileUploadFrame");
    And then on click of a button i want to submit the import form:
    Code:
    		if (!frame.validate()) return;
    		frame.submitForm();
    		dialogBox.hide();
    The problem is that i want to handle the response from server which is in IFrame. I tried to submit it with callback etc. but nothing worked. How should this be done?

    #2
    You need to write out an HTML response from the server that contains a JavaScript call out to the main frame. Here's a more detailed response on the same thing.

    Comment

    Working...
    X