Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7970537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:24:55+00:00 2026-06-04T07:24:55+00:00

Currently i am using the google cloudprint button for my site <script src=//www.google.com/cloudprint/client/cpgadget.js></script> <script

  • 0

Currently i am using the google cloudprint button for my site

<script src="//www.google.com/cloudprint/client/cpgadget.js"></script>
<script defer="defer">
    var gadget = new cloudprint.Gadget();
    gadget.setPrintButton(document.getElementById("custom_print_button"));
    gadget.setPrintDocument("url", "Cloud Print test page",
                            "http://www.google.com/cloudprint/learn/");
</script>

I want to send an email when I hit the print button, is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:24:56+00:00Added an answer on June 4, 2026 at 7:24 am

    No problem at all… just attach an onclick handler to the print button, or bind the click with jQuery and call a function to do your email. I used it to create a document with Ajax before it was printed:

    <script>
        function printIT() {
            jQuery.ajax({
                url: "print_this.php",
                context: document.body,
                success: function(responseText) {
                    alert("Document sent!");
                    return false;
                }
            }); 
        }
    </script>
    
    <button id="print_button_container" class="ui-link" onclick="printIT();"></button>
    
    <script src="//www.google.com/cloudprint/client/cpgadget.js">
    </script>
    <script defer="defer">
        var gadget = new cloudprint.Gadget();
        gadget.setPrintButton(document.getElementById("print_button_container"));
        gadget.setPrintDocument("url", "My Document", "http://www.yourpath.com/yourdoc.html");
    </script>
    

    Simplified version… not tested but should work 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: I'm using Google Chrome Currently I have this test page http://www.evecakes.com/doodles/canvas_size_issue.htm It should
I bought a domain www.whatever.com and i'm currently using google apps. Is there a
Currently I have a site that is using Google Checkout's mini cart system and
I'm currently using this code: com.google.javascript.jscomp.Compiler.setLoggingLevel(Level.OFF); com.google.javascript.jscomp.Compiler compiler = new com.google.javascript.jscomp.Compiler(); CompilerOptions options =
Using Google Maps InfoBox - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html Currently the map will scroll - pan control
I have created a simple python web site using Google App Engine. Currently, the
I am currently using Google AppEngine(Java) to build a web site. I created a
I am currently using the Google Maps MarkerClusterer v3 (http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/reference.html) and have been very
Currently using Google Analytics as a supplement to our paid tracking software, but neither
I am currently using Google API to point the position on Google map. this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.