1
    <head runat="server">
        <title>Untitled Page</title>

        <script type="text/javascipt">
    function startDownload()
    {
    var url='E:files\\sample.pdf'; 
    window.open(url,'Download');
    }
    </script>
    </head>


    <body>
        <form id="form1" runat="server">
        <script type="text/javascript">
            function openPopup()
            {
                popupwindow=window.open("Form.aspx",'WinName','width=900,height=500,left=200,top=200');
            }
            s=alert("show");
             s1=setTimeout("startDownload()",10000); 

        </script>

         <div>

              <a href="" onclick="openPopup();return false" target="_blank">Click here to view Brochure</a>
        </div>
        </form>
        </body>

Edited by pavankumarr: code change

Votes + Comments
Thanks for sharing
Hi,

I want to download file(pdf) using save dialog when user clicks a link from Html Page.

There is html page where i used anchor tag to open a PopUp window(aspx form) where user will enter his details

and submit the details which will save in database.After submitting the details save dialog window will open where 

user can save the file on his local m/c.

The first part i had completed where user can save the details in datbase.

But after submitting the details I&#39;m not able to open the save dialog or not able to download the from.

Please find my code.

       
Please help me regadring the issue of downloading or saving the file.


Thanks in Advance
Pavan Kumar R
2
Contributors
1
Reply
20
Views
5 Years
Discussion Span
Last Post by LastMitch
0

I don't understand your code snippet. I manage to make the pdf open in a new window but not sure what you mention above.

Overall, it works. Thanks for sharing.

I attached an image on how it looks:
bd81f7c46209253df53ead66cba9d34b

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.