473,698 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing Hidden IFrame / Printing an unopened page

1 New Member
I'm trying to put a print button on a page that will open the print dialog box for a PDF that there is no need to open. My original plan was to use a hidden iframe calling a javascript function that does what everyone suggests

function iPrint(myFrame)
{
myFrame.focus() ;
myFrame.print() :
}


Everything I've tried along these lines (i.e. window.frames[0].print) has worked in Firefox but not IE. IE will print the main window or nothing.

Any ideas? I'm trying to avoid a pop-up window because there is no need for the user to open the PDF.
Apr 4 '07 #1
1 4035
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

Have you tried printing a displayed iframe? You could try fixing it to display when printing and then hide again.
Apr 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
42379
by: Marina Ferguson | last post by:
Hi, I have a document with an iframe. The main doc has a "Print" button. The idea is that when the user clicks it, the contents of the iframe is printed. For some reason instead of the iframe I get a print out of the whole page. I am using IE6. I spent several hours searching the groups but didn't find anything that works. Even when I do this: iframe_name.focus(); window.print();
3
2287
by: Bryan Z | last post by:
I was wondering how do you print just part of a webform in asp.net -- like just printing the contents of a textbox or label. I know that it will involve javascript, but I cannot get the javascript function to work. Basically, this is the scenario --- A simple web page with a search form. User enters search value, and a datagrid displays what the search returns with a template column to link to the details of each record found. ...
0
1870
by: Vince | last post by:
I have a generic page that I use for printing content, and it contains an iframe into which I put the url for the page to be printed. I dynamically size the iframe so that it correctly displays the entire contents of the printed page. There are 2 problems with this: 1) The resulting printout chops off the bottom part of the page, even though it displays the full page in the browser. Even in print preview it still chops off the bottom....
1
1847
by: Madame Blablavatsky | last post by:
hello, i am trying to build a kind of very, very simple ritch text editor for people to use with a very simple cms. at the moment i am working on the basic structure. the text is put in an iframe. then a hidden textfield gets the value from the content of that iframe. then the hidden textfield is sent to a php-page so it can be put in a
4
2550
by: Drew | last post by:
This might beyond the scope of this group because it deals with SharePoint, but I'm not sure if I can't get it to work because of SharePoint or because JavaScript is weird (I don't have much experience with JavaScript). Anyway, here is the code i'm working with. Basically, it creates appends a hidden IFrame to the page, gets the links from the IFrame, and displays those which have the "OnLink" property. The weird thing is that when I...
5
2053
by: pbd22 | last post by:
hi. i have a hidden iframe for uploading files. when i check the httpfilecollection on the server, it is always zero - the files never make it to the server. i know all the javascript is working correctly on the client b/c i have followed the local variables using venkman. so, something is happening on the server.
5
2683
by: pbd22 | last post by:
Hi. I am trying to poll a long-running process via a hidden IFrame. I am noticing that the online errata gives advice for handling a server response: window.parent.handleServerResponse(); The problem I am having with this is that the above function gets called ***after*** the long-running response is completed.
1
2215
meenakshia
by: meenakshia | last post by:
hi forum i m facing a problem regarding printing withing the frames page i have a main frame page. which has on the left the menu html page loaded and on the right the target content page. when i try to open a page on the right and print two different pages using iframes it does not work , on the contrary when i load the page without frames it does the print job perfectly.i fail to understand why this is happening i m posting the partial...
8
3526
by: jay123 | last post by:
hello, i really need help from you experts. my problem is i have one page abc.aspx, and then their is other page called def.aspx(which is printable version), which gives some information used for printing , now my requireement is that i want abc.aspx page to be displayed in def.aspx (empty abc.aspx just with its design) but i dont want to copy paste my abc.aspx code in def.aspx page as abc.aspx page is very big(340kb). any help will...
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8897
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,...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
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
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
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.