Force downloading of a file - do not open!

Associate
Joined
24 Mar 2003
Posts
41
I want to place a button in an html form to download an XML file; however internet exploerer keeps trying to open it in IE instead of saving to disk. Any idea how to force it to save?

Cheers!

<form>
<input type="button" onclick="window.open('http://www.mysite.co.uk/results.xml')" value="download" name="downloadResults">
 
Brain101 said:
I want to place a button in an html form to download an XML file; however internet exploerer keeps trying to open it in IE instead of saving to disk. Any idea how to force it to save?

Cheers!

<form>
<input type="button" onclick="window.open('http://www.mysite.co.uk/results.xml')" value="download" name="downloadResults">

Isnt that a result of having xml files associated with IE?

Try going to an explorer window, going Tools, Folder options, File types, and deleting the xml entry.
 
alternatively, make sure the instructions clearly say...

Right click on the link, and select "Save As..."

people will probably mess it up first time, but they'll go back to their page and realise their mistake.
 
Visage said:
Isnt that a result of having xml files associated with IE?

Try going to an explorer window, going Tools, Folder options, File types, and deleting the xml entry.
He's after a solution that will work for everyone, regardless of file associations I think. Try what Dj_Jestar said, that should work :)
 
Back
Top Bottom