Saturday 20 May 2017

Download file from server using jquery

// Using html anchor tag

<html>
<head>
    <script>

<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
</head>
<body>

    <a id="lnk" href="FilePath\Exported%20Excel.xls"
        download="FilePath\Exported%20Excel.xls">download
        file</a>
    <script>
        try {
            $('#lnk').on('click', function () {
                window.runnerWindow.proxyConsole.log('The link was clicked')
            });
        }
        catch (error)
        { throw error; }
                //# sourceURL=yereg.js
    </script>
</body>

</html>

No comments:

Post a Comment

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...