Hi, I am trying to do pretty much the same, as is for example on sourceforge. After a user creates some data, i generate a file and i want it to be offered to him after a page loads. However, i know almost nothing about javascript and simple copy paste of
< script type="text/javascript">
var download_url = "http://downloads.sourceforge.net/sourceforge/itextsharp/itextsharp-4.1.2-dll.zip?use_mirror=dfn";
function downloadURL() {
if (download_url.length != 0 && !jQuery.browser.msie){
window.location.href = download_url;
}
}
jQuery(window).load(downloadURL);
< /script>
is not enough. It is important for the user to download the file, so how to do that?
A question related to the previous is - where to store the file i created? Once while using the asp.net development server and then on the real iis server? And how should this address look? When i tried
setTimeout("window.location.href='file://localhost/C:/Downloads/file.pdf'", 2000);
i was getting nothing, with http an error of unknown adress.