Forums Register Login

content-type issue

+Pie Number of slices to send: Send
I have a JSP page with content type set to
<%@ page contentType="application/vnd.ms-excel"%>. I also have some javascript code in it, but seems it is not working. Can I have script inside a JSP page of this kind?

Since i have set the content type, the page asks for "open or save dialog". I want to close the parent window (the IE) on clicking "save". However, the "open" option is working fine. Is it also possible to prevent the dialog-from getting displayed, and simply bypass to "open" option.
+Pie Number of slices to send: Send
If you're instructing the browser to open the content in a non-browser application, you would have to check the documentation of that application (in this case Excel) to see if it supports Javascript.

If you use the "inline" attribute of the Content-Disposition header tag, the browser will open the app up in the specified app, providing an app is registered for the given content type.

Search this forum for "Content-Disposition" if you want an example.
+Pie Number of slices to send: Send
Thanks a lot for you response.Can you please suggest me a solution to my situation, where in i need to close the blank window that is left out when the user chooses 'save' in the dialog.
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1133 times.
Similar Threads
Displaying the File Download dialog box
Content type Issue
Problem in closing the browser
How to open the RTF format data in Netscape and IE
How to allow user to browse/provide local folder location/path for download
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:41:30.