Javascript Window.print(); Question
Jan 27, 2006
I've written a Fax Cover Sheet generator web page for the company I work for. The user inputs all the information into a form and clicks 'print'. I do not know CGI, so i've accomplished the tasking using javascript to generate a pop-up window containing the formatted information from the form. However, no matter what I try, I can't get the browser to print the pop-up box instead of the main window. Can someone help me?
Here is sample code that imitates how the real page works:
View 4 Replies
ADVERTISEMENT
Dec 14, 2005
Is it possible to send attributes into this function to change the
print preferences from Portrait to Landscape with IE 6.0 set as the
standard browser? Right now I'm using
javascript:window.print()
as the command.
Clients want it and I want to confirm it's not possible. If I'm using
an old, deprecated process, please give me a heads-up. I'm no
Javascript genius.
View 1 Replies
View Related
Jul 3, 2007
I would like to print a Web page with javascript method window.print() without pages number and footer.
View 7 Replies
View Related
Aug 30, 2011
Can I configure this function to make it print a certain pixel only?
Around 500px X 700px Center.
CODE:
Is it possible?
View 1 Replies
View Related
Jul 21, 2009
I'm facing a different problem.
I'm having a long page where there will be content to be printed.
I'm using the css using media=print to hide all the unwanted contents and using the window.print method to invoke printing.
But when i click the print button it prints only partial content upto a single page and all the remaining contents are discarded.
I wonder what may be the problem!!!
And there's another problem , i've bills to be printed in order but dont want them to be breaking in between pages .(ie a bill should be printed fully if there is enough space at the bottom or should be printed on the next page)
How can i do both of this?
View 3 Replies
View Related
Jan 3, 2002
Hey all. I am currently putting together a test page of mine where a popup window comes up showing a coupon that I will have a link enabling them to print it simply and easily.
For my current code I have a simple <a href="javascript:window.print()"> that works great on both Internet Explorer 5 and Netscape 4/6 on the PC but for some reason, Internet Explorer 5 for Macintosh doesn't do a thing.
View 2 Replies
View Related
Jul 20, 2005
Is it possible to do an ie print from javascript that does not bring
up the print dialog? I'm in a situation where i need to load a
sequence of files into a browser and print all of them without any
user interaction.
View 3 Replies
View Related
Jun 22, 2007
So I have a print page that's written in a combination of php & html. The body tag is outside the php with an onload="window.print();window.close;"
The idea behind this print page is when the print button is pressed on the parent window, it generates this child window that is specifically made larger for printing reports that people can read easily. I use css for text styles and the table "width" is longer.
All the html code inbetween the body tags is created by php using the php "Print" function.
</head>
<body class="page" onload="window.print();window.close;">
<?php
Print "<table width=1600 border=1 cellpadding=0 cellspacing=0 class=page>";
Print "<tr bgcolor=cbe5ff>";
Print "<td width=30>WO #</td>";
// yada yada yada
?>
My problem is it does not print the table dimension or the font size above a certain size. When I print in landscape, which is what this page is designed for, it prints the same size as "scaled to fit" portrait. On the screen the size is correct and if I use the browser print button, it prints to the correct size.
The css works, it will make changes and will even make the text smaller just won't print over a certain size (9pt?).
View 1 Replies
View Related
Jul 23, 2005
Is it possible to print [using window.print()] a page that has no "title"
and "page number" on the top and no "link adress" and "date" on the bottom
(to print just a page just as it is...)?
View 2 Replies
View Related
Feb 26, 2006
I'm creating a Pizza order form. Part of my project includes the ability to print a receipt which I have created successfully as a pop-up window; however, I have the window.print() function in that part of the code and it will not print the pop-up receipt, but rather the main window. Code:
View 1 Replies
View Related
Jul 20, 2005
I use a print link that causes a problem with Opera 7. The link looks
like this <a href="javascript:parent.frames.mainFrame.print()">Print
this page</a>
I also used
<a href="javascript:print()">Print this page</a>
and it also worked with most browsers. I realize that it only works if
you have Microsoft Windows versions for PC but that is what most of
out customers have anyway. I have also noticed that there is a problem
with certain browswers, for example Explorer 4 version but also with
newer browser like Opera 7.01.
I does work perfecly well with Mozilla-compatible browsers but why not with Opera. With Opera it first looks as if it would work, but when you choose print from the
Operating system it prints the wrong frame although i specifically try
to call the right frame. Has anyone found a workaroung or sollution to
my problem.
View 3 Replies
View Related
Nov 13, 2003
I've got a client who has a investor presentations that I take from PowerPoint and optimize into jpegs then into a JavaScript slide show.
What I'd like to do is have a button in there that states, 'Print Current Slide' that would allow them to do just that. Problem is, the JavaScript slideshow is in a popup window and I really don't want to have another when they want to print a slide. Also, the optimized jpegs are smaller and not very good print quality.
Could I have my button dynamically select a full sized jpeg on the server and auto print that without actually showing it? So clicking on the 'Print Current Slide' button would tell the script what slide they want to print and to search it out in a directory and automatically send that to the printer?
View 4 Replies
View Related
Nov 24, 2003
I know this Javascript code prints the current page:
"<a href="javascript:window.print()">IMPRIMIR</a> ";
What I am looking for is to print a page which is not the current one, so I need to address the pointer such as :
"<a href="javascript:file.txt.print()">IMPRIMIR</a> ";
I know it does not work, but you imagine what I mean.
Is there anything similar to try?
In short, I want to print a page which is not the current displayed in the screen with a simple clik on a button or on a hyperlink.
View 1 Replies
View Related
Jun 26, 2007
I am using javascript function window.print to print a page. having a link on the page "print page"
It is working fine.
I need to set the print properties as default such as page format as "landscape" instead of portrait.
Secondly my page contents are on the full page. that way while printing the content goes outside the page. how can i set the page size ?
View 1 Replies
View Related
Jul 23, 2005
Is that posible to start to print atraight away without the window's "print"
prompt when I do window.print()?
View 4 Replies
View Related
Jul 20, 2005
I need to print a long HTML page and the papar cut at the middle of the
page and some of the data lost.
I print with JavaScript command "window.print()".
Is there any option to control or to split the page that will fit for
A4 page size and not cut it.
View 2 Replies
View Related
Feb 17, 2006
I know this should be kind of easy, but I am very unfamiliar with Javascript.
What I am looking to do is have an image (coupon) that when clicked on,
it either prompts for printing only that image, or pops up a window and
automatically after loading the image in the new window, brings up the
print dialog box. What would you suggest is the best way to do this?
View 2 Replies
View Related
May 31, 2006
I don't know if this is even possible, but if I have a window.Print command is there a way to set the printing preference to Landscape by default. I have this table and I got it as small as possible but the print still gets cut off to the right. The only solution is printing in Landscape.
View 1 Replies
View Related
Aug 11, 2004
i'm trying to send a html page directly to the print preview and bypass opening it in a new window. i've found a good solution by having a frameset with 2 rows. the top row is relative while the bottom row is 1 pixel height (hidden at the bottom). the user clicks a print button in the main top frame and it loads the html page that needs to be printed in the bottom hidden frame. on the print file, i included:
<body onload="window.print();">
therefore, the code above initiates an instant print preview. the problem is that it doesn't work in safari (osx). instead of printing the specific frame that the page is in, it print the frameset at the _top of the browser window.i tried changing the location to this., parent.window, etc...but, none worked.
View 3 Replies
View Related
Mar 11, 2007
I have a printing problem that I'm hoping someone can solve.
I have a small company website that uses javacript under IE5.5. For
web pages that display large lists I used a div to build a simulated
iframe.
When a user pulls the right slide to move down the table and decides
to print the screen, the printed output shows the information from the
beginning of the table and stop after 13 lines. This often differs
from the "view area" on the client desktop.
Any suggestions how to get the "view area" to the printer?
View 2 Replies
View Related
Jul 20, 2005
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 complete
source for the generated page is below, I've tried every combination I can
think of, but absolutely nothing happens when I click the button... I tried
the right-click print from the context menu, and everything comes up... so,
the issue's in code somewhere ....
View 3 Replies
View Related
Oct 21, 2009
I've scrollable screen. I'm having a print button on it and "window.print()" function is called on its onclick event.My problem is it only prints the "viewable" part of the screen, not the whole screen.P.S. I'm using IE7 and it must work for IE7 atleast (for rest I'm not bothered).
View 2 Replies
View Related
Jul 7, 2009
I'm having an issue with window.print().
Code JavaScript:
$('a.printButton').click(function(){
window.print();
$('#couponBox').animate({ height:"0px"}, 500);
return false;
});
When I click the l hyperlink, the print box comes up and I go to preview, but nothing is on the page. I have a print style sheet that hides everything else on the page and re-adjusts the couponBox's overflow to appear, but the image that's in couponBox that is supposed to show doesn't when I preview. However, after I cancel out the print box and go to print from the browser, the image appears just as it's supposed to.
View 1 Replies
View Related
Apr 27, 2007
We have a printer-friendly version of a web page that we want to print. The problem is we want it to print on a legal size paper by default.
View 1 Replies
View Related
Jul 9, 2010
how to print a div content without opening the window.i need direct print without the window.open ()
View 1 Replies
View Related
May 4, 2011
How to set print function and POP-UP window is closed?
I have working code to print content like:
PHP Code:
function printpage() {
window.print();
}
and <body onload="printpage()"> in POP-UP window.
How to automatic close this POP-UP when user clicks Standard windows print button?
View 4 Replies
View Related