Print this page button

Hi,
I found this very handy liittle script for adding a print
this page button to my pages. See below. I'd like to change the
button though to a small image of a printer. Does anyone know how I
can modify this script to achieve that.
Thanks
K
<SCRIPT Language="Javascript">
This script is written by Eric ([email protected])
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
function printit(){
if (window.print) {
window.print() ;
} else {
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0
HEIGHT=0
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting
dialog box WebBrowser1.outerHTML = "";
</script>
<SCRIPT Language="Javascript">
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
if (VERSION > 3) {
document.write('<form><input type=button
value="Print this Page" name="Print"
onClick="printit()"></form>');
</script>

Looks a bit archaic to me.
Just do this -
<form>
<input type="image" name="printMe"
src="images/whatever.jpg"
onclick="self.print();">
</form>
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"KHam1234" <[email protected]> wrote in
message
news:gdpre8$mgq$[email protected]..
> Hi,
>
> I found this very handy liittle script for adding a
print this page button
> to
> my pages. See below. I'd like to change the button
though to a small image
> of a
> printer. Does anyone know how I can modify this script
to achieve that.
>
> Thanks
>
> K
>
> <SCRIPT Language="Javascript">
>
> /*
> This script is written by Eric ([email protected])
> For full source code, installation instructions,
> 100's more DHTML scripts, and Terms Of
> Use, visit dynamicdrive.com
> */
>
> function printit(){
> if (window.print) {
> window.print() ;
> } else {
> var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0
HEIGHT=0
>
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
> document.body.insertAdjacentHTML('beforeEnd',
WebBrowser);
> WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a
prompting dialog box
> WebBrowser1.outerHTML = "";
> }
> }
> </script>
>
> <SCRIPT Language="Javascript">
> var NS = (navigator.appName == "Netscape");
> var VERSION = parseInt(navigator.appVersion);
> if (VERSION > 3) {
> document.write('<form><input type=button
value="Print this Page"
> name="Print" onClick="printit()"></form>');
> }
> </script>
>

Similar Messages

  • How do I add a "Print this page" button (not just a "Print" button) to a PDF?

    I am creating a multipage PDF in Acrobat Pro 8 for a client and it includes a linked table of contents with several sections and also several forms sprinkled throughout. I need to be able to add buttons that allow the user to print specific page numbers. Is it possible to add a "print this page" button to a page ... or even a "print this form" in case the form within the larger document is multiple pages? I would appreciate any help, thanks!

    I was just coming back to here to say I've figured it out and am using an invisible button (over text that was created to look like a link) on each page... tested and working (when combined with the code). Thank you for your replies!

  • Creating 'print this page' button using AS3

    Hi all,
    I need to create a button, or at least a movie clip that
    functions like a button that will print a page when clicked.
    Ideally I would like to have the button as part of the flash
    application, which will be online embedded into a web page as a
    .swf. on click the print page dialog box will appear, and the user
    will be able to print out the web page. What is the best way to
    code this?

    sure. the swf's main timeline is a movieclip, so if you want
    to print everything that's on the swf stage, use the printjob()
    class to print the main timeline.

  • Button to 'Print This Page Only to a printer of your choosing'

    I need to create a button to allow my user to print their current page to a printer of their choosing.
    Having them go to file print, etc etc is not an option as it will be used by hundreds of people, and the pdf is hundreds of pages long. (if they just select 'Print' that would be a lot of wasted paper)
    Ive been able to locate a Javascript that prints to the Default Printer, but my users change computers several times per day, and the default printer might located on the other side of town!
    Here is the script for 'Print this page to default printer' if anyone can assist by altering it to choose which printer, that would be amazing..
    Javascript:
    this.print(false, this.pageNum,this.pageNum);
    Even creating a button to open the print dialog box with 'Current Page' pre-selected would be ok.

    You need to use the PrintParams properties to get/set the print UI:
    var pp = this.getPrintParams();
    pp.firstPage = this.pageNum;
    pp.lastPage = pp.firstPage;
    pp.interactive = pp.constants.interactionLevel.full;
    this.print(pp);

  • How do I add a print this page link? Here is what I've done so far...

    I have tried this code:
    // Print current page silently
    print({bUI : false, nStart : pageNum, nEnd : pageNum});
    which works from the bookmark column. However, when I try to apply it (set link) within a document, it doesn't work.  My clients really want to be able to add a "print this page" link on every page (fun)... so your help is appreciated. Cheers.

    I was just coming back to here to say I've figured it out and am using an invisible button (over text that was created to look like a link) on each page... tested and working (when combined with the code). Thank you for your replies!

  • Print this Page Java html snippet

    I decided to try adding the above to one of my pages in iWeb.
    I added the java code as shown on Old Toad's site:-
    <form>input type="button" value=" Print this Page "
    onclick="javascript:parent.window.print();return false;"/></form>
    I placed this code in an html snippet in iWeb and applied it and it showed up as Print this Page in the site. I then published the site to a local folder and uploaded the changed pages to my external server. After uploading, I visited my site and tried clicking on the button and it did not work.
    Anyone know why it did not work? The code is correct and I copied and pasted from OT's site directly into an html snippet.
    Is the code site or page specific or generic, that it will work for any site?
    Does it only work in MobileMe published sites and not for sites uploaded to an external server?
    Any insights gratefully received.

    Does the print button work when the site was on your HD locally? Here's some different code that you might try:
    <SCRIPT LANGUAGE="JavaScript">
    // This script was supplied free by Hypergurl // <a class="jive-link-external-small" href="http://www.hypergurl.com">http://www.hypergurl.com</a> <!--
    hide script and begin if (window.print) { document.write('<form>Click Here
    To ' + '<input type=button name=print value="Print" ' + 'onClick="javascript:window.print()">
    This Page!</form>'); } // End hide --> </script>
    The original code should work on any server as far as I know. Cyclosaurus is the authority on javascript and should have an answer.
    This Google search has numerous examples of code:http://www.google.com/search?hl=en&safe=active&client=safari&rls=en-us&ei=MBCjSd X6LoK2sQOIj8zGCQ&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=javascriptto+printpage&spell=1

  • Is there a way to create a "Print This Page" link?

    I have a client who want to insert a print this page link that launches their print utility. Is this possible with Muse?

    This is not a function of Muse. You'll need to use the 'insert arbitrary HTML' function to add this.
    Here's where to get the javascript to insert.
    Beware that Muse only produces a generic stylesheet and does not define its specific media type. That means that printing a Muse-generated web page or rendering a Muse website on a mobile device can be extremely messy.  Elements may fall off of a page or may be sized oddly. The Muse showcase shows how the Horace and Lydia site falls apart in print. Elements appear broken and blank pages result.
    Muse developers need to employ semantic markup so that users can design stylesheets for different media types. This topic is related to the frequent requests that Muse should be able to design for mobile devices. Muse just isn't smart enough to do what a professional designer would want.

  • Thank you. Save or print this page for your records. We'll also send you an email confirmation. Case ID: 421912520 You have chosen to call Apple later. When you're ready, call the phone number below during business hours and refer to your Case ID for fas

    Thank you.
    Save or print this page for your records. We'll also send you an email confirmation.
    Case ID: 421912520
    You have chosen to call Apple later. When you're ready, call the phone number below during business hours and refer to your Case ID for faster support.
    1-800-MY-IPHONE
    6:00 a.m. to 11:00 p.m. Central
    iPhone
    Restore or update not working as expected
    You can review this case in the Cases &amp; Repairs section.
    Additional Resources
    Return to Apple Support home.
    Visit your Support Profile.
    Create another support request.
    Your contact information
    Onechai John
    <Email Edited by Host>

    They already have your number and/or email address and maybe have sold it several times already to others as well. They also use number generators - software that will automatically create them - some work and some don't, they don't care, they send out millions and a few will fall for it and send them money. The only way to "hide" would be to change both and your password, but then it would happen again at some point.

  • Print this page

    I am trying to add a PHP "print this page" script to my
    dreamweaver template, that I created myself and it does not want to
    work once uploaded. The template has one editable area for content.
    This is the script ( I found on the internet). I am not a developer
    but I suspect that the fact I am using a template is the problem.
    <?php
    /*PHPrint - Save this file as phprint.php
    Make any Page Printer Friendly!
    Copyright by MikeNew.Net, Notice must stay intact
    Legal: MikeNew.Net is not responsible for any damages caused
    by use of this script. (Not that it will, probably. Never
    has.)
    This script will make your pages printer friendly.
    Optionally, it will strip images as well. */
    //Do you want to strip images from the printable output?
    // If no, change to "no". Otherwise, images are stripped by
    default.
    $stripImages = "no";
    // That's it! No need to go below here. Upload it and test.
    $startingpoint = "<!-- startprint -->";
    $endingpoint = "<!-- stopprint -->";
    $read = fopen($HTTP_REFERER, "r");
    $value = "";
    while(!feof($read)){
    $value .= fread($read, 4096);
    fclose($read);
    $start= strpos($value, "$startingpoint");
    $finish= strpos($value, "$endingpoint");
    $length= $finish-$start;
    $value=substr($value, $start, $length);
    function i_denude($variable)
    return(eregi_replace("<img src=[^>]*>", "",
    $variable));
    function i_denudef($variable)
    return(eregi_replace("<font[^>]*>", "", $variable));
    $PHPrint = ("$value");
    if ($stripImages == "yes") {
    $PHPrint = i_denude("$PHPrint");
    $PHPrint = i_denudef("$PHPrint");
    $PHPrint = str_replace( "</font>", "", $PHPrint );
    echo $PHPrint;
    // Next line mandatory. Please don't remove. Nobody will see
    it except SE crawlers, anyway. Thanks! :)
    echo "<br><a href=\"
    http://www.mikenew.net/\"><img
    src=\"
    http://www.mikenew.net/images/php.gif\"
    echo "alt=\"printer friendly pages script, php\" width=\"20\"
    height=\"8\" border=\"0\"></a>";
    echo "<br/><br/>This page printed from:
    $HTTP_REFERER";
    flush ();
    ?>

    What are you expecting this script to do? What attracted you
    to it?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "fatpad" <[email protected]> wrote in
    message
    news:[email protected]
    >I am trying to add a PHP "print this page" script to my
    dreamweaver
    >template,
    > that I created myself and it does not want to work once
    uploaded. The
    > template
    > has one editable area for content. This is the script (
    I found on the
    > internet). I am not a developer but I suspect that the
    fact I am using a
    > template is the problem.
    >
    > <?php
    >
    > /*PHPrint - Save this file as phprint.php
    > Make any Page Printer Friendly!
    > Copyright by MikeNew.Net, Notice must stay intact
    > ************
    > Legal: MikeNew.Net is not responsible for any damages
    caused
    > by use of this script. (Not that it will, probably.
    Never has.)
    > This script will make your pages printer friendly.
    > Optionally, it will strip images as well. */
    >
    > //Do you want to strip images from the printable output?
    > // If no, change to "no". Otherwise, images are stripped
    by default.
    > $stripImages = "no";
    > // That's it! No need to go below here. Upload it and
    test.
    >
    > $startingpoint = "<!-- startprint -->";
    > $endingpoint = "<!-- stopprint -->";
    >
    > $read = fopen($HTTP_REFERER, "r");
    > $value = "";
    > while(!feof($read)){
    > $value .= fread($read, 4096);
    > }
    > fclose($read);
    > $start= strpos($value, "$startingpoint");
    > $finish= strpos($value, "$endingpoint");
    > $length= $finish-$start;
    > $value=substr($value, $start, $length);
    >
    > function i_denude($variable)
    > {
    > return(eregi_replace("<img src=[^>]*>", "",
    $variable));
    > }
    >
    > function i_denudef($variable)
    > {
    > return(eregi_replace("<font[^>]*>", "",
    $variable));
    > }
    >
    > $PHPrint = ("$value");
    >
    > if ($stripImages == "yes") {
    > $PHPrint = i_denude("$PHPrint");
    > }
    >
    > $PHPrint = i_denudef("$PHPrint");
    > $PHPrint = str_replace( "</font>", "", $PHPrint );
    >
    > echo $PHPrint;
    > // Next line mandatory. Please don't remove. Nobody will
    see it except SE
    > crawlers, anyway. Thanks! :)
    > echo "<br><a href=\"
    http://www.mikenew.net/\"><img
    > src=\"
    http://www.mikenew.net/images/php.gif\"
    > echo "alt=\"printer friendly pages script, php\"
    width=\"20\" height=\"8\"
    > border=\"0\"></a>";
    > echo "<br/><br/>This page printed from:
    $HTTP_REFERER";
    > flush ();
    > ?>
    >

  • Tell a friend/print this page

    how can you add those links on your page?
    ...tell a friend...
    ...print this page...
    Thanks

    Hoi Bart,
    Have a look here, it's all Javascript post-publish stuff, you know the drill.
    http://www.hypergurl.com/printpage.html
    http://www.sitetoolcenter.com/website-tools-and-tutorials/tell-a-friend-javascri pt.php
    See you soon
    Leo

  • Why does the new "share this page" button not stay deleted?

    Two issues with the latest two releases (35.0 and the one before)...
    1. The new "share this page" button (with the paper airplane icon) reappears everytime FF is started -- even though I have removed it from the toolbar. How can I make stay gone?
    2. The new info bar at the screen bottom "FF automatically sends some data..." is always present when FF starts -- even though I have completed the "choose what I share" Option. How do I permanently remove this?

    Separate Issue;
    Your System Details shows;
    Installed Plug-ins
    Shockwave Flash 16.0 r0
    Shockwave Flash 14.0 r0
    Adobe Shockwave for Director Netscape plug-in, version 12.1.5.155
    Adobe Shockwave for Director Netscape plug-in, version 12.1.4.154
    Having more than one version of a program may cause issues.
    Grab the uninstaller from here:
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html Uninstall Flash Player | Windows]'''
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html Uninstall Flash Player | Mac]'''
    Then reinstall the latest version.
    Flash Player '''v16.0.0.235 https://www.adobe.com/products/flashplayer/distribution3.html'''
    Shockwave Director '''v12.1.5.155 http://get.adobe.com/shockwave/'''
    '''https://support.mozilla.org/en-US/kb/how-to-fix-preferences-wont-save'''

  • "print this page" firefox crashed. How can I get back to that page?

    Sending my ipod nano in for repair. Lost the page at the end that needed to be printed and brought to a ups store. Now I can't seem to get back to that.
    Can I just print out the status page or something? I didn't even get to see what information was really on it.

    I did it all online so I haven't contacted tech support yet, but it looks like I might have to for this simple little issue

  • Which number I have to call for double payment for ' document to go' see my bills.Save or print this page for your records. We'll also send you an email confirmation. Case ID: 341915446 You have chosen to call Apple later. When you're ready, call the phon

    Where I have to resolve my problem for double billing for an app I purchased. App under question is ' DOCS TO GO' both normal and premium version.
    Help me
    Thanks

    Where I have to resolve my problem for double billing for an app I purchased. App under question is ' DOCS TO GO' both normal and premium version.
    Help me
    Thanks

  • T500 and HP Photosmart 7350 - prints blank pages

    I've done a search but can't seem to find anything. When I try to print it goes through the motions but pops out a blank page. I've uninstalled and reinstalled with the latest driver from HP. It prints a test page OK directly using the printer's buttons and through the HP software. It won't print when I reinstall and click the "Print Test Page" button. It also prints a test page when it recalibrates the cartrideges. I've tried different cables and connecting to different USB ports; makes no difference. Anyone have this problem?

    Sorry to ask an obvious question - but are you putting the paper in the right way? I have a 7520, and as long as there is ink in it, and the paper is facing the correct way, and I hear the print job go to the printer, it prints fine.
    Are you hearing the pringing attempting to print?
    GB

  • OJ 8000 prints alignment page with every job

    WinXP, New install.  OJ is printing this page every time, and driving me nuts!  Is there a key sequence on the panel or something to turn it off?

    Hi Everyone,
    This tends to happen because the alignment that was done the previous round is cancelled or failed. In the event that it is cancelled, please kindly let it run once properly, that should solve the issue. In the event that the alignment failed, please try to run the printhead cleaning via the software and let it run the alignment once more at the end of it.
    Hope this helps.
    Although I am an HP employee, I am speaking for myself and not for HP.
    ***Say thanks by clicking the "Kudos! Star" which is on the left***
    **Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.**

Maybe you are looking for

  • Can't import from Formac anymore

    I was hit and miss with iMovie 4.0, but 5.0 didn't work at all.. so now I bought 6.0. I am still having the same problem. I have a VHS hooked up to Formac (not the TVR, just regular). I can see it playing in iMovie when I press the arrow button. When

  • MIRO Issue

    Dear Sapgurus, While posting the Vendor Invoice thru MIRO, system is giving error Message "Invoice already entered under accounting Document no. 2600000460  2009". reference PO no. -7000000640, Inv No. 35. Duplicate Inv. Check option is active in Ven

  • Sync problems using H.264 video in FCE timeline...please help!!!!

    Okay. I'm reposting this question to see if anyone can help. I'm shooting on a Panasonic HDC-HS700 and it's working fine. I use Aunsoft MTS Converter to convert to H.264 so that I can edit my footage in Final Cut Express. When I play back in the comp

  • Resize dialog keeps auto opening everytime I open a file

    So we just got rid of one of our designers and the computer I got him was a tad better then the workstation I am using. Over the weekend I decided to give my machine to my boss who has a ancient slow PC, and take the newer faster box for myself. All

  • Transferring Boris FS plug-ins from CS3 to CS4 - Mac OSX

    I purchased Continuum Complete 5 AE for Mac OSX to use the plug-ins for my CS3 versions of After Effects and Premiere Pro. Now that I have CS4 versions of After Effects and Premiere Pro, how do transfer the plug-ins to work with the CS4 versions. Acc