Reply to Re: how to write html tag to download a file intead of show content of file in browser

Your name:

Reply:


Posted by yihucd on 12/21/82 11:39

Thank you all so much. I put following code in my JSP code.
But the thing is that, when I load this page, I only see the pop up
window without first seeing the acutal page.

What I want is a page showing the following sentence

" Click file"

When the user click on the word file, then a window pop up. How to do
this?

<%
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment; filename=" +
"xls_to_del.xls" );
%>


<html>

<head>
<title>click file</title>
</head>

<body>

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

</body>

</html>

[Back to original 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

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