You are here: how to write html tag to download a file intead of show content of file in browser « HTML « IT news, forums, messages
how to write html tag to download a file intead of show content of file in browser

Posted by yihucd on 10/16/55 11:39

I am write a html page that has one link on it. The purpose of the link
is to popup a window to let the user download/save the Excel file to
his/her local computer. But by using my code, when I click the link
"file" in the page, the content of the excel file showed in the browser
(I have firefox as my defult browser).

What I want is that : no matter what the user's default browser is,
when user click the link in the page, the browser should always pop up
a window to let the user save the file.
(because it is annoying to show some garbage in the browser window)

Thanks,

David



------------------------------------------my code --------
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>click file</title>
</head>

<body>

<p>click <a href="xls_to_del.xls">file</a></p>

</body>

</html>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация