[JSP][Javascript] click droit sur un lien
Bonjour à tous,
je me retrouve devant un petit problème.
J'ai une page jsp avec laquelle les utilisateurs savent télécharger un outils.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| <%
Logger cat = Logger.getLogger("downloadEPTool.jsp");
%>
<html>
<head>
<script language="javascript">
function downloadTool(toolNo)
{
document.formtool.toolid.value = toolNo;
document.formtool.action ='<%=response.encodeRedirectURL("download2s")%>';
document.formtool.submit();
}
</script>
<title>CORDIS FP6: Download Electronic Proposal Tool</title>
<jsp:include page="templateUp.jsp?jspTitle=Download Electronic Proposal Tool&jspName=downloadEPTool.jsp"/>
<br>
<br>
<span class="h3p"><p align="center">Please click on a link to download the Electronic Proposal Tool (EPT) suitable for you:</span></p>
<br>
<p align="center">
<table cellpadding="10" cellspacing="10" border="0" summary="content">
<form name="formtool" method="post" action="">
<%
Vector tools = null;
try
{
Context ctx = new InitialContext();
DocumentManagementHome documentManagementHome =
(DocumentManagementHome)PortableRemoteObject.narrow(ctx.lookup
("DocumentManagement"),DocumentManagementHome.class);
DocumentManagement documentManagement;
documentManagement = documentManagementHome.create();
cat.info(" documentManagement.getOfflineToolsInfo() -> Vector ");
tools = documentManagement.getOfflineToolsInfo();
}catch(DocumentManagementException dme){
cat.error("JSP: DocumentManagementException Details: ", dme);
}catch(NamingException ne){
cat.error("JSP: NamingException Details: ", ne);
}catch(CreateException ce){
cat.error("JSP: CreateException Details: ", ce);
}catch(RemoteException re){
cat.error("JSP: RemoteException Details: ", re);
}
if (tools!=null)
{
for (Enumeration enum = tools.elements(); enum.hasMoreElements(); )
{
Vector datatool = (Vector)enum.nextElement();
int toolId = ((Integer)datatool.elementAt(0)).intValue();
String toolName = (String)datatool.elementAt(1);
String toolComments = (String)datatool.elementAt(2);
cat.info("ToolId: "+toolId+" ToolName: "+toolName+" ToolComments: "+toolComments);
%>
<tr>
<td height="30" align="left">
<a href="javascript:downloadTool('<%=toolId%>')"><%=toolName%></a>
</td>
<td height="30" align="left">
<%=toolComments%>
</td>
</tr>
<%
}
}
%>
<input type="hidden" name="toolid"></input>
<input type="hidden" name="downType" value="eptT"></input>
</form>
</table>
</p><br><br>
<!-- CONTENTS ENDS HERE -->
<jsp:include page="templateDown.txt"/>
</html> |
quand je clique sur le lien je n'ai aucun soucis pour télécharger, mais quand je fais un click droit --> save target as, j'ai un beau message d'erreur du browser
http://stessy.developpez.com/tmp/tool.jpg
Je n'ai aucune idée pourquoi il me sort cette erreur