<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title>Topic &#x27;Opening a file download dialog from a JavaScript function.&#x27; in forum &#x27;Webmasters and Developers&#x27; - dslreports.com</title>
<link>http://www.dslreports.com/forum/Opening-a-file-download-dialog-from-a-JavaScript-function-21478544</link>
<description></description>
<language>en</language>
<pubDate>Fri, 10 Feb 2012 01:54:15 EDT</pubDate>
<lastBuildDate>Fri, 10 Feb 2012 01:54:15 EDT</lastBuildDate>

<item>
<title>Re: Opening a file download dialog from a JavaScript function.</title>
<link>http://www.dslreports.com/forum/Re-Opening-a-file-download-dialog-from-a-JavaScript-function-21478709</link>
<description><![CDATA[cowboyro posted : in the HEAD section:<br><pre class="brush: text">&lt;script type="text/javascipt"&gt;&#012;function startDownload()&#012;{&#012;var url='http://server/folder/file.ext';  &#012;window.open(url,'Download');&#012;}&#012;&lt;/script&gt;&#012; &#012;</pre><!--end code block-->in BODY<br><pre class="brush: text">&lt;script type="text/javascipt"&gt;&#012;setTimeout("startDownload()",5000); //starts download after 5 seconds&#012;&lt;/script&gt;&#012; &#012;</pre><!--end code block--><br>or if you have just 1 download location you can combine the 2 in the body:<br><br><pre class="brush: text">&lt;script type="text/javascipt"&gt;&#012;setTimeout("window.open('http://server/folder/file.ext','Download')",5000); &#012;&lt;/script&gt;&#012; &#012;</pre><!--end code block--><br>Edit: I wouldn't worry so much about the 0.01% that are paranoid and turn off javascript... But *do* provide a link in case a popup blocker kills the download.]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/Re-Opening-a-file-download-dialog-from-a-JavaScript-function-21478709</guid>
<pubDate>Mon, 24 Nov 2008 17:30:28 EDT</pubDate>
</item>

<item>
<title>Re: Opening a file download dialog from a JavaScript function.</title>
<link>http://www.dslreports.com/forum/Re-Opening-a-file-download-dialog-from-a-JavaScript-function-21478595</link>
<description><![CDATA[OZO posted : Any reason why do not use good old way?<br>For security reasons users may have JavaScript turned off...]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/Re-Opening-a-file-download-dialog-from-a-JavaScript-function-21478595</guid>
<pubDate>Mon, 24 Nov 2008 17:10:47 EDT</pubDate>
</item>

<item>
<title>Opening a file download dialog from a JavaScript function.</title>
<link>http://www.dslreports.com/forum/Opening-a-file-download-dialog-from-a-JavaScript-function-21478544</link>
<description><![CDATA[franzcatch posted : I am developing a webpage and want my users to be able to download a file from me.<br><br>I know I can put a link on the page for the user to click like this:<br><pre class="brush: text">&lt;a href="download/VB6IP.zip"&gt;Download&lt;/a&gt;  &#012; &#012;</pre><!--end code block--><br>However, I would like to launch the dialog from a JavaScript function.<br>Is there an easy way to accomplish this?<br><br><small>--<br>Insert wisdom here...</small><br>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/Opening-a-file-download-dialog-from-a-JavaScript-function-21478544</guid>
<pubDate>Mon, 24 Nov 2008 16:59:36 EDT</pubDate>
</item>

</channel>
</rss>

