Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am trying to use the jquery.fileDownload.js plugin as in this DEMO.
My code is as follows--
HTML
  <script src="js/jquery.fileDownload.js"></script>
  <script type="text/javascript">

  $(document).on("click", "a.myClass1", function () {
    $.fileDownload($(this).prop('href'), {
        preparingMessageHtml: "We are preparing your report, please wait...",
        failMessageHtml: "There was a problem generating your report, please try again."
    });
    return false; //this is critical
});
  </script>

 </head>

 <body>
 <a class="myClass1" href="http://myServer:6024/sites/abc/TechDocs/CSE/111.zip">Download Here</a>


The problem is, its displaying the failmessageHtml in jquery dailog and then proceeds to normal download as it happens on clicking the link.
Has anyone used this plugin to download file? What mistake I'm doing?
Any help regarding the problem is appreciated.

Regards,
Sayan.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900