Giter Site home page Giter Site logo

Comments (5)

drkrtj avatar drkrtj commented on July 18, 2024

Hello,
I am sure I am doing something wrong. I am getting two instances of the printer popup showing which triggers the, "Prevent this page from creating additional dialogs". How do I correct this issue? Here is my button and script setup.
Thanks

Printout Form

<script> jQuery(function($) { 'use strict'; $(".payment_processing_check_by_mail").find('#print_giftcert_check_mo_mailform').on('click', function() { //Print with custom options $(".giftcert_checkmailform").print( { globalStyles: true, mediaPrint: true, stylesheet: null, noPrintSelector: ".no-print", iframe: true, append: null, prepend: null, manuallyCopyFormValues: true, deferred: $.Deferred(), timeout: 750, title: null, doctype: '' }); }); }); </script>

from jquery.print.

drkrtj avatar drkrtj commented on July 18, 2024

Printout Form

from jquery.print.

drkrtj avatar drkrtj commented on July 18, 2024

<button class="giftcert_check_mo_mailprint_button" id="print_giftcert_check_mo_mailform" onclick="jQuery.print()">Printout Form</button>

`<script>
jQuery(function($) {
'use strict';

        $(".payment_processing_check_by_mail").find('#print_giftcert_check_mo_mailform').on('click', function() {
            //Print with custom options
			
            $(".giftcert_checkmailform").print( {
				globalStyles: true,
				mediaPrint: true,
				stylesheet: null,
				noPrintSelector: ".no-print",
				iframe: true,
				append: null,
				prepend: null,
				manuallyCopyFormValues: true,
				deferred: $.Deferred(),
				timeout: 750,
				title: null,
				doctype: '<!doctype html>'
			});
        });
	});

</script>`

from jquery.print.

CitizenOfRome avatar CitizenOfRome commented on July 18, 2024

You are calling it twice, once in the HTML onclick and then the script tag

from jquery.print.

drkrtj avatar drkrtj commented on July 18, 2024

from jquery.print.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.