timothy ma and constance lee wrote:
Sirs
I got the problem how to display a generated pdf file into a new windows in
xml using javascript: window.open
My program is in this way:
<form= abc action=1.servlet>
</form>
onclick="javascript:document.abc.submit"
comp.lang.javascript FAQ
Referencing Forms and Form Controls.
The Most Common Mistake
http://www.jibbering.com/faq/faq_not....html#faComMis
But it opens a pdf file in the same window so my original one is overriden
<script type="text/javascript">
var WindowObjectReference = null;
function OpenRequestedPDFFile()
{
if(WindowObjectReference == null || WindowObjectReference.closed)
{
WindowObjectReference = window.open("path/filename.pdf",
"PDFWindowName", "location,menubar,resizable,scrollbars,status" );
}
else
{
WindowObjectReference.focus();
};
}
</script>
</head>
<body>
....
<form name="FormName" action="1.servlet" onsubmit="OpenRequestedPDFFile();">
[...]
<p><input type="submit" value="Submit the form">Note that the submission
of the form will open a new window loading a <img src="PDFIconLogo.gif"
width="..." height="..." alt="PDF" title="PDF" style="cursor:
customizedPDF.cur, auto;"> file and starting Adobe Acrobat Reader in
that new window. [...file size...]KB</p>
</form>
Not tested.
DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Netscape 7.2 :)