473,883 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

print another page without window popup

14 New Member
I want to print a page from another page. I have a master page with links to other page. When I click "print," it should print the another page.
The function window.print() is printing only the active page. So on click print i am opening a new window.

In the onload event of the target page i have used
<body onload="window. focus();window. print();window. close();">

Eventhough it's working, at the same time the window is also popping up behind the printer set up screen. when i click print or cancel the window gets closed automatically.
i don't want the window to pop up. Do suggest me if there is any other alternative way.
Apr 13 '10 #1
0 1748

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

Similar topics

2
1844
by: Richard Morey | last post by:
Hi, I am trying to build an "in between" page to show an animated "Working.." gif while a long process runs on the server via ASP. The problem is that the table/gif is not displaying when I load the inbetween page.. This is my code snippet:
3
8362
by: Craig | last post by:
First of all, this one is driving me crazy, so thanks in advance for any help!! I've got a javascript function in a parent document that generates an HTML document on the fly when a button is clicked... that generated popup contains a button that's supposed to print the contents of the popup window (self). However, the button won't print (nothing happens on click) from the newly generated popup to print the contents of the window... the...
4
3252
by: Fred | last post by:
I'm a newbie to JavaScript so be gentle. You know that funky IE margin issue that causes the right side of the page to get cut off when the user prints the html document? http://www.post-gazette.com/interact/20000120radin.asp Well… I'd like to warn/help the IE users of the issue before they print page. I want to combine a popup message with
1
8865
by: nospam | last post by:
All I am trying to achieve the following: Main window page's asp code writes the following line to launch a popup window (note the IFRAME has to be in the popup window, it cannot be in the current page) response.write("<script language='JavaScript'>var tempprintwindow = window.open('papertempprint.asp?path=" & filePath & "','');")
9
4931
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work fine from a link. The button does bring up the popup window, but when I press the links on the page, it doesn't return or close the window. ****************************************************************************
22
130587
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the document and closes it with the following code: <body onload="window.print(); window.close();"> This works correctly (or at least the way I expect it to work under MS Internet Explorer, but it cuases Netscape to "crash"
1
4859
by: Jessica | last post by:
Hi, I'm sorry if this has been asked before. I'm a designer and occasional javascript hacker, not a javascript writer. I cannot believe I have spent over 4 hours searching for this on Google and nothing I have found solves this silly little problem. Background ---------- I have been assigned a poorly-designed site to SEO. It has a number of
1
3433
by: nadig.umesh | last post by:
Hi, I have window 1 from which i launch window 2 Window 2 remains open showing page 1 In window 2, i navigate from page 1 to page 2 Window 1 tries to launch window 2 once again Currently, window 2 is showing page 2, but the request is for page 1 Is it possible to identify on page 2 unload that page 1 is being
1
3000
by: raven0522 | last post by:
hi, i want to print a div section in my aspx page without having to use a popup. Right now I am just calling a javascript function and passing the Div ID to it on the Print button click event. function printDiv(divID) { var tds = document.getElementsByTagName("div"); for(i=0; i<tds.length; i++) tds.item(i).style.display = "none"; document.getElementById(divID).style.display = "block";
0
9798
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
10863
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
10422
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
9588
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...
0
7136
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
5807
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
4622
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
4230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3241
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.