In Javascript, the following code will open a link in a new tag.
window.open('url');
I want the browser prompt me a download dialogue box after i click a link and finally redirect me to a thank you page. The following code could make it.
<a href="http://www.google.com" onClick="window.open('http://localhost/file.zip')">Download</a>
After u have clicked the download link, A download dialogue box will be prompted and the page will go to Google.
Please note that this does not apply to some file type like .txt or .html etc. The file content will be shown in a new tag of the browser instead.
Done =)
