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

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

<channel>
<title>Opening a file download dialog from a JavaScript function. in Webmasters and Developers</title>
<link>http://www.dslreports.com/forum/r21478544</link>
<description></description>
<language>en</language>
<pubDate>Tue, 09 Feb 2010 23:33:00 EDT</pubDate>
<lastBuildDate>Tue, 09 Feb 2010 23:33:00 EDT</lastBuildDate>

<item>
<title>Re: Opening a file download dialog from a JavaScript function.</title>
<link>http://www.dslreports.com/forum/remark,21478709</link>
<description><![CDATA[<A HREF="/useremail/u/217865"><b>cowboyro</b></A> : in the HEAD section:<br><textarea name="code" class="text" cols=50 rows=10>&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;</textarea><!--end code block-->in BODY<br><textarea name="code" class="text" cols=50 rows=10>&lt;script type="text/javascipt"&gt;&#012;setTimeout("startDownload()",5000); //starts download after 5 seconds&#012;&lt;/script&gt;&#012;</textarea><!--end code block--><br>or if you have just 1 download location you can combine the 2 in the body:<br><br><textarea name="code" class="text" cols=50 rows=10>&lt;script type="text/javascipt"&gt;&#012;setTimeout("window.open('http://server/folder/file.ext','Download')",5000); &#012;&lt;/script&gt;&#012;</textarea><!--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/remark,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/remark,21478595</link>
<description><![CDATA[<A HREF="/useremail/u/755055"><b>OZO</b></A> : 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/remark,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/remark,21478544</link>
<description><![CDATA[<A HREF="/useremail/u/831094"><b>Franz</b></A> : 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><textarea name="code" class="text" cols=50 rows=10>&lt;a href="download/VB6IP.zip"&gt;Download&lt;/a&gt;  &#012;</textarea><!--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/remark,21478544</guid>
<pubDate>Mon, 24 Nov 2008 16:59:36 EDT</pubDate>
</item>

</channel>
</rss>
