473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

display pdf in new window

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"

But it opens a pdf file in the same window so my original one is overriden
Jul 23 '05 #1
2 3090
On Sat, 04 Sep 2004 05:01:26 GMT, timothy ma and constance lee wrote:
My program is in this way:

<form= abc action=1.servlet>
</form>

onclick="javascript:document.abc.submit"

But it opens a pdf file in the same window so my original one is overriden


You ..must be using IE if that worked.

Try a validator on your HTML..
<http://validator.w3.org/>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
DU
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 :)
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Oliver | last post by:
Hello, i'm having trouble with a css type popup. It's not doing what i want in Mozilla 1.6 and in IE6.0 it's not working at all. The html code looks like this: <div class="themenkueche"...
2
by: William Gill | last post by:
I need to display a couple of labels and a checkbox from each entry in my database. Simple enough, but there are several hundred records, and I only want to display 5 or 10 at a time. Can this be...
0
by: Ferry Boender | last post by:
Hi, I'm relatively new to Xlib programming, and I ran into a little problem. I'm trying to insert keypress events into a X window. The following code works: ...
1
by: rajbala.3399 | last post by:
Hai all, I need to get multiple image buttonsand wheni click on the image button it should display corresponding image on window and if i click another image button it is also display on same...
9
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo"...
4
by: ArrK | last post by:
I want to use a control frame to create and/or modify the content (images and text) of a display frame - all files and images are client side. . When I try to write to the display frame from the...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
5
by: wreed06 | last post by:
I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML...
2
by: H. Rodriguez | last post by:
Hello, I would like to be able to open a new IE window on the client side and display a PDF document in the new window. Many tutorial sites that I have checked suggest opening a new IE window...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.