Currently It just opens up the xml, but i want to get a dialog box to ask the client whether to save/open. I am using jquery
$('#btnDownloadConfig').click(function(event){
var location="/csm"+path;
window.open(location);
/*it opens up a new window having url "http://incsm:8181/csm/files/12345/csmclient.xml*/
});
My path on Server
E:\Tomcat 6\webapps\csm\files\12345
the above path contains csmclient.xml file, how can i make a dialog box appear asking to save/open for this file?
This isn’t possible. If you want the browser to prompt the user to download a file that it would usually render then you must send a Content-Disposition header (marking the file as an attachment) from the server. There is nothing you can do client side.