how to capture IE browser FileDownload box open ,save and cancel event

how to capture IE browser FileDownload box open ,save and cancel event

View Answers

September 11, 2008 at 4:43 PM

Hi friend,


To Download a file :


1.Create a Jsp page having Download Button.

<HTML>
<HEAD>
<TITLE>File Download</TITLE>
<script>
function fileDownload(){
window.location.href="filedownload.jsp";
}
</script>
</HEAD>

<BODY>
<input type="button" name="file" value="Download" onclick="fileDownload();">
</BODY>
</HTML>

2.Create a jsp page "filedownload.jsp" to download the file.

This code download the text file.

<%@ page import="java.io.*,java.util.*" %>
<%
try
{
InputStream bis = new FileInputStream("c:/data.txt");
response.reset();
response.setContentType("application/text");
response.setHeader("Content-disposition","attachment; filename=" +"data.txt");
byte[] buf = new byte[1024];
int len;
while ((len = bis.read(buf)) > 0){
response.getOutputStream().write(buf, 0, len);
}
bis.close();
response.getOutputStream().flush();
}
catch(Exception e){
e.printStackTrace();
}
%>


Thanks









Related Tutorials/Questions & Answers:
how to capture IE browser FileDownload box open ,save and cancel event - JSP-Servlet
how to capture IE browser FileDownload box open ,save and cancel event ... in response object.B/C of this ,browser fileDownload dialog box comes.we need to capture open,save and cancel event of filedownload box in javascript. Please
Capture browser file download event - JSP-Servlet
Capture browser file download event  Hi, I appreciate your help and thaanks for that.But my question was when filedownload dialog box comes in browser,how we can come to know that user has clicked on Open,save or cancel button
Advertisements
how to add save,discard,& cancel button in a message box - Struts
how to add save,discard,& cancel button in a message box  how to add save,discard,& cancel button in a message box
save excel file with save and open dilog box
save excel file with save and open dilog box  following is my jsp code it is working correct.. i want to save excel file throgh jsp bt not by hard...");) user should have freedom to save the file in any location so plz give me
how to display csv file directly in IE browser .
how to display csv file directly in IE browser .  here is my code : public String download(){ if(log.isDebugEnabled()){ log.info... open directly in excel file but not in IE . I am using IE 8 with windows 7
Save,Discard and Cancel button - Struts
Save,Discard and Cancel button   How can I create a confirm message with Save,Discard and Cancel button instead of OK/Cancel buttons in java script inside a jsp
ModuleNotFoundError: No module named 'odoo11-addon-event-registration-cancel-reason'
ModuleNotFoundError: No module named 'odoo11-addon-event-registration-cancel...: ModuleNotFoundError: No module named 'odoo11-addon-event-registration-cancel-reason...-event-registration-cancel-reason' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo11-addon-event-registration-cancel-reason'
ModuleNotFoundError: No module named 'odoo11-addon-event-registration-cancel...: ModuleNotFoundError: No module named 'odoo11-addon-event-registration-cancel-reason...-event-registration-cancel-reason' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo12-addon-event-registration-cancel-reason'
ModuleNotFoundError: No module named 'odoo12-addon-event-registration-cancel...: ModuleNotFoundError: No module named 'odoo12-addon-event-registration-cancel-reason...-event-registration-cancel-reason' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo8-addon-event-registration-cancel-reason'
ModuleNotFoundError: No module named 'odoo8-addon-event-registration-cancel...: ModuleNotFoundError: No module named 'odoo8-addon-event-registration-cancel-reason...-event-registration-cancel-reason' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'odoo9-addon-event-registration-cancel-reason'
ModuleNotFoundError: No module named 'odoo9-addon-event-registration-cancel...: ModuleNotFoundError: No module named 'odoo9-addon-event-registration-cancel-reason...-event-registration-cancel-reason' error? Thanks   Hi, In your
How to capture screenshot in url?
How to capture screenshot in url?  Hi, How to capture screenshot and it will store the capture image in url like this http://localhost/xxx/yyy/ it wil not sore C:\ or D:\ it should store like this http://localhost/xxx/yyy
capture
capture  How can i capture values or text selected in drop down menu or in combo box or in any input forms and print it on the same page ?? also the selected value i want to store it in data base. how can i do that?? plzzzz
ModuleNotFoundError: No module named 'open-browser'
'open-browser' How to remove the ModuleNotFoundError: No module named 'open-browser' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'open-browser'  Hi, My Python
Java Swing Open Browser
Java Swing Open Browser Java provides different methods to develop useful... that will open the specified url on the browser using java swing. This example will really... = new JButton("Open Browser"); button.addActionListener(new ActionListener
Text box size varying in IE 7 but ok in firefox - Java Beginners
Text box size varying in IE 7 but ok in firefox  I have problem with the size of text field which varies in IE 7 only but its fixed in Firefox( I... box size and placed in td with same width ,STill the first text box grows
The scroll browser event of jQuery
The scroll browser event of jQuery In this tutorial ,we will print message on browser's window scrolling using scroll browser event of jQuery. In this example, some paragraphs are written , when we scroll down, a message
Browser Back Button click event javascript
Browser Back Button click event javascript  I am using the below code but window.onBeforeUnload is not working with back button.. how can i apply the below code for the click event of back button? window.onBeforeUnload
How to capture video and then how to store it in mobile memory
How to capture video and then how to store it in mobile memory  Hello there, I'm developing a mobile application where i'm capturing video from... but they are not working properly some of them capture video but doesn't allow me
Text box control--keypress event
Text box control--keypress event  In my form have a text box...My requirement is... when is type characters in that box... before typing the 3rd character the space should come automatically or programmatically...the sturucture
PHP Open Excel File in browser - PHP
PHP Open Excel File in browser  How we can open an excel file using PHP code. I don?t want to let the user to download it rather I would like to get it open in the web browser. Any help would be great. Thank you very much
Drop Down Reloads again in IE..How to prevent this?
Drop Down Reloads again in IE..How to prevent this?  Hi i was using two drop down box..One for Displaying date followed by another for Dispalying.....This is the problem im facing in IE but it works well in Firefox..How to overcome this IE issue
I need to launch multiple instances of IE browser from one windows M/C on the another windows M/C
I need to launch multiple instances of IE browser from one windows M/C on the another windows M/C  multiple instances of IE browser from one windows M/C on the another windows M/C
How to capture output from console into textarea in java?
How to capture output from console into textarea in java?  Hi, I would like to know how can we display the result of a program in java into a textarea instead of displaying it on console. Thanks
How to capture picture from webcam using java
How to capture picture from webcam using java  i want catch the image from web-cam using jsp, If anyone knows please answer me
retaining save dialog box even after clicking save button - Java Beginners
when i open save dialog box and input a file name that is already present... get it back??(even if i cal save dialog box again it would open again from...retaining save dialog box even after clicking save button  I am
how to open a web page using proxy in java and handling button event in that web page..?
how to open a web page using proxy in java and handling button event in that web page..?  Sir, what i need is a code which uses proxy address and opens a web page i.e for example and then clicks a "yes" button in that page
How to save value in JSP
How to save value in JSP  Employee Name Time-IN Time-OUT... 324 2012-12-12 save i want to save dis value jsp to action ...how can i get all value ..and store..how can its values goes
How to use place hoder in IE(version : 8)
How to use place hoder in IE(version : 8)  how to use placeholder for input field(type=text) and password field (type= password) in IE
ModuleNotFoundError: No module named 'mcloud-plugin-browser-auto-open'
: ModuleNotFoundError: No module named 'mcloud-plugin-browser-auto-open' How to remove the ModuleNotFoundError: No module named 'mcloud-plugin-browser-auto-open' error...ModuleNotFoundError: No module named 'mcloud-plugin-browser-auto-open
How to create an input box?
How to create an input box?  How to create an input box
How to create a confirmation box?
How to create a confirmation box?  How to create a confirmation box
Screen Capture
Screen Capture  How to capture the screen using jsps and servlets
browser
browser  how to make a browser
How to get browser time zone?
How to get browser time zone?  How to get browser Time Zone and browser date using java concept
how to insert check box
how to insert check box   how to insert check box into jtable row in swing
How to Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
com.onfido.sdk.capture - onfido-capture-sdk version 16.2.0 Maven dependency. How to use onfido-capture-sdk version 16.2.0 in pom.xml?
of onfido-capture-sdk in pom.xml? How to use onfido-capture-sdk version 16.2.0...; com.onfido.sdk.capture - onfido-capture-sdk version 16.2.0 in your project The next step is to save...com.onfido.sdk.capture  - Version 16.2.0 of onfido-capture-sdk Maven
com.onfido.sdk.capture - onfido-capture-sdk version 14.1.2 Maven dependency. How to use onfido-capture-sdk version 14.1.2 in pom.xml?
of onfido-capture-sdk in pom.xml? How to use onfido-capture-sdk version 14.1.2...; com.onfido.sdk.capture - onfido-capture-sdk version 14.1.2 in your project The next step is to save...com.onfido.sdk.capture  - Version 14.1.2 of onfido-capture-sdk Maven
com.onfido.sdk.capture - onfido-capture-sdk version 5.3.3 Maven dependency. How to use onfido-capture-sdk version 5.3.3 in pom.xml?
-capture-sdk in pom.xml? How to use onfido-capture-sdk version 5.3.3 in pom.xml... - onfido-capture-sdk version 5.3.3 java library in your project. Now you can save...-capture-sdk version 5.3.3 library in your project. ADS_TO_REPLACE_3 Step 3: Save
how to disable browser back button
how to disable browser back button  Am doing a web application in that how to disable browser back button using java script
How to save file in vi editor?
How to save file in vi editor?  Hi, I am trying to find commands... the commands? Thanks   Hi, Here are the details: How to save file... :w to save the file Type :wq to save and quit Type :q! to quit without saving
How to save image on the server by applet
How to save image on the server by applet  HI, in my project I am... If user want to export this chart as GIF format then this chart should be save as a gif image on the server directory. Can any Body help me how can I do it Thanks
How to save image on the server by applet
How to save image on the server by applet  HI, in my project I am... If user want to export this chart as GIF format then this chart should be save as a gif image on the server directory. Can any Body help me how can I do it Thanks
How to save data - Swing AWT
How to save data  Hi, I have a problem about how to save data ,but first before data save to dababase, data must view in jLisit or Jtable... save data from jList and Jtable(in jList or jTable data will be many).Thank's
Show message and confirm dialog box
. Once you click on the first button then the simple message box will open which... on the second button then the confirm dialog box will open which asks for "... then a message dialog box will open with message "You clicked on "Ok"
J query event for selecting the more than one div in tablet browser(Select and drag)?
J query event for selecting the more than one div in tablet browser(Select... ctr l and shift not possible to use. Touch start and drag event is support the tablet or ipad browser. Touch start and drag event work with in the div tag. I want
com.onfido.sdk.capture - onfido-capture-sdk-core version 15.4.3 Maven dependency. How to use onfido-capture-sdk-core version 15.4.3 in pom.xml?
of onfido-capture-sdk-core in pom.xml? How to use onfido-capture-sdk-core version... Save pom.xml Checking library dependency tree How to add Gradle  dependency? How to use  com.onfido.sdk.capture - onfido-capture-sdk-core
com.onfido.sdk.capture - onfido-capture-sdk-core version 19.3.1 Maven dependency. How to use onfido-capture-sdk-core version 19.3.1 in pom.xml?
of onfido-capture-sdk-core in pom.xml? How to use onfido-capture-sdk-core version... Save pom.xml Checking library dependency tree How to add Gradle  dependency? How to use  com.onfido.sdk.capture - onfido-capture-sdk-core
com.onfido.sdk.capture - onfido-capture-sdk-core version 4.5.1 Maven dependency. How to use onfido-capture-sdk-core version 4.5.1 in pom.xml?
of onfido-capture-sdk-core in pom.xml? How to use onfido-capture-sdk-core version... Save pom.xml Checking library dependency tree How to add Gradle  dependency? How to use  com.onfido.sdk.capture - onfido-capture-sdk-core

Ads