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?
I'm not very good with coding and this seems like a very basic issue. I have a resume page that opens up in a new window. I made a button on the resume page that fires up the print command window when clicked using this code: javascript:window.print() It works fine except it only prints the first page. How I can get it to print all the pages?
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.
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?
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.
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.
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?
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:
Basically, I have a div section in my xhtml that I want visible for print (div {display: block;} in my print css), and visible if somebody has javascript disabled (therefore also div {display: block;} in my screen css), but not visible on screen with javascript activated (i.e., turned off in javascript with div.style.display = "none").
The problem is one of precedence. When displaying the page on screen I want my non-interactive javascript code to execute after the css rules have been applied (so I put my javascript within window.onload). But when a user attempts to print, I'd prefer if the css (for print) were applied after the javascript. Unfortunately this doesn't seem to be what happens.
I'm trying to create a simple hangman script, i want to enter a letter in the guess box and have it detect whether its in the secret word or not and print out the result to the another text input eg:
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)
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.
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.
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>
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?).
I have a requirement to print particular area of a web page. Web page has many div's and one iframe in it. I need to print a div and iframe content with one single print command. I am able to do so but then two print dialog boxes come up when the print command is given. I have written a javascript function to achieve this.
I did find a solution to this but then I do not understand why onload fails to work in this scenario. I am summarizing steps I had followed.
1) Read the contents of div using innerHTML and store it to a variable.
2) Read the contents of iframe and store it to a variable. "Details" is id of the iframe.
var iframeObj = document.getElementById("Details"); var iframeDoc; frameDoc = iframeObj.contentWindow.document;
3) Open a window and write all these content after writing these few lines flashDivWindow.document.write('<html><head><title>Print page</title></head><body onload="javascript:window.print()">');
When I view the source all HTML code can be seen as expected, however this doesn't trigger onload event. I need to refresh the page for print to happen, some thing which isn't practical. Using Javascript reload doesn't help as print is invoked even before the page content is reloaded.
I want have two iframes in a single php page and I print them using two print methods. May I know how to print the both iframes using a single print method?
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...)?
I am trying to use the LPR command inside a javascript to print a PDF file directly to the printer. Want just a simple webpage with a button which will print test.pdf when clicked. code...
I know very little when it comes to javascript. If you know of a better way to use the lpr command