Displaying the results of the upload

By default, AppletFile displays the response from the upload request by writing the data received to the document object passed to the submit method. While this works fine for most applications, the following situations require special handling:

Uploading over SSL
Uploading Using Frames


Uploading over SSL

If you are using SSL, some browsers will display a warning message that the SSL connection was lost as soon as you navigate away from the result page. This problem can be avoided by using the finishUrl parameter to display the results. When finishUrl is used, the response data received from the upload request is not written to the document object. Instead, the page referenced by the finishUrl parameter is loaded passing the data as a parameter. For a working example of how to use the finishUrl parameter, take a look at the Finish Upload sample application.


Uploading Using Frames

If you are using frames, it may be possible that the File Upload Applet is running in a different frame than the one you want the results to be displayed in. If this is the case you might be tempted to simply pass the document object for that frame to the submit method. However, this technique is not recommended as it can cause some web browsers to hang before all of the results are displayed. As a general rule, the upload results must be displayed in the same frame that the File Upload Applet is running in.

If you still need to update a different frame, you can include client-side JavaScript in your upload response that refreshes that frame. For example, if the frame you want to update is called main and the page that you want displayed is called result.asp, include the following in your response:

<script language="JavaScript">
<!--
     top.main.document.location = "result.asp";
//-->
</script>