aspose file tools*
The moose likes JSF and the fly likes Getting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Getting "Unspecified" Java Script Error When trying to save a File." Watch "Getting "Unspecified" Java Script Error When trying to save a File." New topic
Author

Getting "Unspecified" Java Script Error When trying to save a File.

Suresh KumarS
Greenhorn

Joined: Dec 18, 2008
Posts: 7
I am trying to let the user Save a XML file using the File Download dialog box. When the user clicks "Open", the file opens just fine. When the user clicks "Save" instead of "Open", it creates a javascript "Unspecified error". However, the file still downloads just fine. But then there is the error on the page that prevents anymore javascript from running. I have put a try{}..catch() around all of my code, but I still get the error. Does anyone know what is going on? Thanks.

I found a similar post http://www.coderanch.com/t/117761/HTML-JavaScript/Unspecified-error-when-trying-save

They mentioned its resolved . But they didn't mentioned how . Can anyone help me to resolve this problem?

Suresh
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Is there any Javascript involved in the file download? If so, what and why?

This error normally comes up when the document (the DOM) can't be found at all.
Suresh KumarS
Greenhorn

Joined: Dec 18, 2008
Posts: 7
No i'm not using any Java Script to download. The Page has a data table from which user can select an element and export it. I wrote a Servlet to export the object into XML File. In the servlet doGet method i'm using ServletOutputStream to perform the operation.
Suresh KumarS
Greenhorn

Joined: Dec 18, 2008
Posts: 7
I forget to mention this. I'm facing this problem only with IE in Windows 2000 Professional. In XP no problem.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
I rather mean, is there any Javascript in for example the onclick attribute of the download button?
Suresh KumarS
Greenhorn

Joined: Dec 18, 2008
Posts: 7
No JavaScript for the Export Button. I'm using JSF so using action attribute of <h:commandButton></h:commandButton> to call a Java Method which will call call the servlet to export the object in xml format.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
You should have mentioned that before.

Which JSF implementation/version are you using?
How does the HTML output of that h:commandButton look like?
Suresh KumarS
Greenhorn

Joined: Dec 18, 2008
Posts: 7
I'm using MyFaces 1.1.5. Sorry for the late reply...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting "Unspecified" Java Script Error When trying to save a File.