473,606 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with the printing of alternative pages

meenakshia
33 New Member
hi forum
i m trying to print two different pages as soon as the form is saved.

i tried to use this command
<A HREF="javascrip t:window.print( )">Print 1st Page</A>
<A HREF="javascrip t:window.print( )">Print 2nd Page</A>

but i was unable to use the link command to force the printer to print the two other pages

print 1st page should print cust1.htm
and print 2nd page should print cust2.htm

any ideas how to go ahead for the same?
smile always
anand
Aug 16 '08 #1
5 1295
acoder
16,027 Recognized Expert Moderator MVP
window.print() prints the current page. Which page is this code in?
Aug 17 '08 #2
meenakshia
33 New Member
hi
thanks for ur reply
well yes i have used the window.print() but it prints a current page
what i want is that if i have page 1.html open
in this page i have 2 links
1st link when clicked will print 2.html page
and 2nd link when clicked will print 3.html page
can you suggest me a way to do so?
i came across an idea that maybe i open both the pages as popup and in those pages use onload to print
is this the right way?
thanks
anand
Aug 24 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Yes, that could work but then you'd have a window open that will need to be closed by the user. An alternative is to use print stylesheets to print only what is required - a kind of "Print-friendly page" using CSS. The way this could work is if you load the stylesheet for the corresponding linked page when the link is clicked.
Aug 25 '08 #4
meenakshia
33 New Member
hi thanks for reply
i cud not understand what u meant to say.
can u suggest me with some example
thanks
anand
Sep 2 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
It was a suggestion, but it may not work depending on the files to be printed and could actually be quite complex. You load a print stylesheet initially for link 1. This could be achieved by having the linked page loaded in the main page but hidden and the print stylesheet shows it and hides the rest of the content. If link 2 is clicked, it changes the stylesheet to the link 2 stylesheet (which shows the link 2 content and hides the rest) and then prints with window.print().

See Going to Print and Working with Alternate Stylesheets.

As I said, this could be more complex than what you're looking for, so an easy solution would be what you suggested earlier about opening a new window and printing.
Sep 3 '08 #6

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

Similar topics

4
4843
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been selected. For example, if I were to have 5 pages with every second page printing, I would get the following results: Page 1 = Print OK Page 2 = Blank Page 3 = Print OK Page 4 = Blank
4
5920
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been selected. For example, if I were to have 5 pages with every second page printing, I would get the following results: Page 1 = Print OK Page 2 = Blank Page 3 = Print OK Page 4 = Blank
4
380
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been selected. For example, if I were to have 5 pages with every second page printing, I would get the following results: Page 1 = Print OK Page 2 = Blank Page 3 = Print OK Page 4 = Blank
6
4083
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if the user wants all pages will produce 3 pages. I want to offer the user the ability to select via the print dialog that only pages 1 and 2 of it are printed or possibly pages 1 and 3 but not 2. At the moment I can produce all three pages...
0
8010
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
7942
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,...
0
8433
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
8300
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
6761
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
5963
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
3922
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
2443
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
1
1550
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.