Hi,
I am a
complete newbie when it comes to JAVAscript and I need some help. Our
web site creates a
text file which I'd like the
system to ask the user
what to do with, either
open , save or cancel. Currently we use the
code
below but that only puts it in the
browser window and for the text files
that is fine but some of the files are csv and that won't work. If I can not
it to ask me what to do with it, can I force it to open in a new window?
Any and all help, ideas greatly appreciated.
John
<html>
<head>
<link href="/design1.css" type="text/css" rel="stylesheet">
</head>
<body>
<%
String FileName="";
if (request.getParameter("FileName")!=null) {
FileName=request.getParameter("FileName").toString();
}
String ReportName="Report Viewer";
if (request.getParameter("ReportName")!=null) {
ReportName=request.getParameter("ReportName").toString();
}
%>
<%
if (FileName.length()==0) {
%>
<h3>Report Viewer - No report Passed!
</h3>
<%
}
else
{
//Got a file name
if (ReportName.length()==0) {
out.println("<h3>Report Viewer
</h3>");
}
else {
out.println("
<h3>" + ReportName +
"
</h3>");
}
%>
[
<a href="<%=FileName%>" target="_blank">Printer
Friendly Format
</a>]
[
<a href="" onclick='window.print();return false;'
Print This Page</a>
]
<pre>
<jsp:include page="<%=FileName%>"/>
</pre>
<%
}
%>
</body>
</html>
Blogs related to JAVAscript help
Dev Shed Forums - Javascript submitting a form [Moved from Java forum]
Date: August 26th, 2006 11:53 AM - bullet - Untitled Post: [QUOTE=scorpion2]Great I sorted it was line above that had the problem. Silly
java[/QUOTE] Oops, you're right. You couldn't have the blank line if you didn't close the String .
...
CAST - Web/E-Business Architect
CAST is presently seeking an exceptional Web/E-Business Architect to
help us take our existing
... We need you to
help us achieve this seamless integration,
... with expert skills in HTML,
Java,
JavaScript, Dreamweaver, CGI, PHP, JSP, .
...
123 DVD Clone 2.3.5
This screen will
help you to tell about your feeling to those whom you love or
... .com/Web-Authoring/
Java-
JavaScript/Jasob-
JavaScript-Obfuscator.html Jasob
... Protects your
JavaScript code from stealing, significantly shrinks size and
...
Ampersand handling of urls
constructError(NativeGlobal.
java:597) at org.mozilla.
javascript.
... JavaScript.execute(
JavaScript.
java:81) Any suggestion other than recompiling JMeter with another
... For additional commands, e-mail: jmeter-user-
help@jakarta.apache.org.
Script Resources
http://www.scriptlance.com/ ScriptSearch.com:
JavaScript scripts, source code, php,
java, books, examples,
help and more! http://scriptsearch.internet.com/ Scripts Directory of PHP, ASP, ASP.NET,
Java,
Javascript, Perl and more!
...
Top Ten Security Threats
Enterprises should strip
Java or
Javascript from HTTP traffic at the firewall. Users will be up in arms over it. It doesn't
help with HTML e-mail messages. E-mail Acceptable Use Policy: Disable all HTML,
Java,
JavaScript, VB,
...