473,722 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PDF popup with close button

OK
Popup window? No problem
PDF in popup? No problem

But what about a couple of Close Window buttons?
Imagine a "Close Window" button at the top of the popup page.
Then the PDF which can scroll. And another "Close Window" button
at the bottom of the page.

Any suggestions for completing this task?
Jul 23 '05 #1
4 20799
"moose" <sk********@exc ite.com> wrote in message
news:57******** *************** **@posting.goog le.com...
OK
Popup window? No problem
PDF in popup? No problem

But what about a couple of Close Window buttons?
Imagine a "Close Window" button at the top of the popup page.
Then the PDF which can scroll. And another "Close Window" button
at the bottom of the page.

Any suggestions for completing this task?


Will this help you; watch for word-wrap.

<html>
<head>
<title>popupPDF .htm</title>
<script type="text/javascript">
function popupPDF() {
var pdf = "http://www.google.com/";
var htm = "<html><head><t itle>popupPDF</title>";
htm += "</head><body>";
htm += "<a href='javascrip t:window.close( )'>Close</a>";
htm += "<iframe src='" + pdf +"'></iframe>";
htm += "<a href='javascrip t:window.close( )'>Close</a>";
htm += "</body></html>";
var win = window.open("", "popupPDF", "");
win.document.wr ite(htm);
win.close;
}
</script>
</head>
<body>
<a href="javascrip t:popupPDF()">P opup PDF</a>
</body>
</html>
Jul 23 '05 #2
> OK
Popup window? No problem
PDF in popup? No problem

But what about a couple of Close Window buttons?
Imagine a "Close Window" button at the top of the popup page.
Then the PDF which can scroll. And another "Close Window" button
at the bottom of the page.

Any suggestions for completing this task?

One can also use the cross on the top right side of the window ;-)
You can also float a close button (or image) above the PDF in one corner
AFAIK

Richard

Jul 23 '05 #3
"McKirahan" <Ne**@McKirahan .com> wrote in message
news:5VX5d.3381 5$He1.945@attbi _s01...
"moose" <sk********@exc ite.com> wrote in message
news:57******** *************** **@posting.goog le.com...
OK
Popup window? No problem
PDF in popup? No problem

But what about a couple of Close Window buttons?
Imagine a "Close Window" button at the top of the popup page.
Then the PDF which can scroll. And another "Close Window" button
at the bottom of the page.

Any suggestions for completing this task?


You've asked for a "Close" button not a link:

<html>
<head>
<title>popupPDF .htm</title>
<script type="text/javascript">
function popupPDF() {
var pdf = "http://www.google.com/";
var htm = "<html><head><t itle>popupPDF</title>";
htm += "</head><body><cen ter>";
htm += "<input type='button' value='Close'
onclick='window .close()'>";
htm += "<br><br>";
htm += "<iframe src='" + pdf +"'></iframe>";
htm += "<br><br>";
htm += "<input type='button' value='Close'
onclick='window .close()'>";
htm += "</center></body></html>";
var win = window.open("", "popupPDF", "");
win.document.wr ite(htm);
win.close;
}
</script>
</head>
<body>
<a href="javascrip t:popupPDF()">P opup PDF</a>
</body>
</html>
Jul 23 '05 #4
moose wrote:
OK
Popup window? No problem
PDF in popup? No problem

But what about a couple of Close Window buttons?
Imagine a "Close Window" button at the top of the popup page.
Then the PDF which can scroll. And another "Close Window" button
at the bottom of the page.

Any suggestions for completing this task?
<a href="loadpdf.c gi?pdf=somefile .pdf"
target="_blank"
onclick="window .open(this.href , this.target,
'..attributes.. ');return false;"Open somefile.pdf in a new window (maybe, if you haven't

disabled that functionality on your browser)</a>

Then have loadpdf.cgi output (using an ASP example, you could use
PHP, or Perl, or JSP, or ColdFusion, or any other server-side
technology for this):

<html>
<head>
<title>Window containing <%= Request.Value(' pdf') %></title>
</head>
<body>
<!-- your close buttons and stuff -->
<layer src="<%= Request.Value(' pdf') %>"><iframe src="<%=
Request.Value(' pdf') %>"></iframe></layer>
<!-- more buttons or whatever -->
</body>
</html>

You probably want some dimensions on the <layer> or <iframe> to make
it bigger than the default size. But remember, the window may not be
the size _you_ specify. Many browsers can honor your window.open()
request but still not provide a window the size, position and with
the chrome you requested.

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #5

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

Similar topics

1
6959
by: dibyendu_k | last post by:
Hi, There is a problem i cant solve regarding Internet Explorer 5.5. It is regarding the Print Dialog Box. From a webpage if I open a popup window (window.open()) containing buttons Print and Close. The functionality is that when i press the "print" button the Print dialog box is opened (window.print();) and when I click on the close button the popup window is closed (window.close();) But the problem occurs when 1. The Print button is...
4
34877
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen as a new window. The original window plus the Modally opened Pop remain in a separate window. What I want to do is close the popup and return to the original window with its view state maintained. The control use to fire the popup window...
4
3004
by: SteveS | last post by:
Hello. This is a strange problem which does not make sense to me. I open a popup page with the following javascript code: function OpenDenyWindow(changeId) { retVal=window.showModalDialog('DenialEmailForm.aspx?id=1234'', 'dialogWidth:650px; dialogHeight:700px; resizable:no;'); //alert("Return val = " + retVal) }
1
11576
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at http://weblogs.asp.net/asmith/archive/2003/09/15/27684.aspx but it was far more complex then I needed. (I got lost trying to figure it all out). Therefore, here goes my simple "web dialog box with parent event handler fireing" solution. ...
18
2980
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead. If you do have any ideas I would really like to hear them. Thanks Colin - 0 - 0 - 0 - I want a glorified popup/context menu on a button that shows only when
2
6952
by: jackson2005 | last post by:
OK, I need to do three different things. On the ONLOAD event I would like a popup box to open. In this popup box I need two text boxes. One for the UserName and one for the BillingTo name. After entering these two items the user can either hit the enter key or press the submit button. The popup window will close and then those two text boxes in the original webpage will be filled in automatically. I would like to have the two...
2
3265
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 validated my HTML and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for...
5
1974
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 and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for the same...
1
3236
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit button". when "submit" button pressed, call the "servlet" in this popup window and then close the "popup" window. <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var X = 200; // change the # at the left for a fixed X co-ordinate to accommodate...
0
8867
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9239
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9158
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2606
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2148
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.