File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Error while uploading file using IE 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error while uploading file using IE 7" Watch "Error while uploading file using IE 7" New topic
Author

Error while uploading file using IE 7

Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
Hi,

I am attempting to upload an Excel file using Java Struts, however, I am facing an error whenever the "Form.submit()" line is encountered in my JavaScript block. I have been using the same code successfully previously for other applications, the only difference being this time that I am using IE7.

My JSP Form declaration is as follows:



I am using the FormFile class at the server to handle the file selected to be uploaded. But the code doesn't even get past the JavaScript to reach the server end.

The JavaScript block I have written is simply as follows:


It is at the line involving "submit()" that I get the JScript error -- "Access Denied".

Any and all help would be hugely appreciated. Thanks!
[ April 18, 2007: Message edited by: Anirvan Majumdar ]
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Interesting...a couple guys on my team did some research into IE7 to see if it would impact our application. I know that many of the changes that they document with IE7 deals with security. In this case, I would wonder if you are submitting back to the same address that displayed the page. Why are you using JavaScript to submit the form?

Edit...I looked back at the test cases that were created and executed for IE7. There is a test case that involves uploading files and that case passed with IE7. I would research the changes in IE7 (I think there is a decent document on the Microsoft site) and see which ones apply. If you find anything out please post back as I would be interested...much better to find out now then after the end users start installing IE7!

- Brent
[ April 18, 2007: Message edited by: Brent Sterling ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while uploading file using IE 7