Results 1 to 2 of 2

Thread: need help in printing a pop up window

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Posts
    45

    Default need help in printing a pop up window

    hello everyone i need to know how to print the content of a pop up window in ext that contains the data that i typed in my form. first off i made a form where i can input my data then then after that if i click the submit button a pop up window will appear with my data and a print button in the bottom.

    this is my code for the save button on my form. if i click the "yes" in the message box the window will appear with my data on it then i can print it. My problem is that it prints the whole content of the browser not the content of the window i created. please help me. i know this one is easy for you guys and im just beginning ti explore ext. thanks...

    //print_content is the window that will hold the data i want to be printed..but left it balnk here...

    Code:
    var form_buttons_save = {
            text: 'Save',
            //formBind:true,
                handler: function () {
                    var myCallback = function(btn) {
                        //console.info('You pressed ' + btn);
                            if (btn == 'yes') {
                                var print_content= new Ext.Window({
                                width:865,
                                id:'pawn_print',
                                height:620,
                                modal:true,
                                buttonAlign:'center',
                                buttons:
                                    [{
                                     text:'print',
                                     handler:function(){window.print(print_content);}
                                    }]        
                                });
                                print_frm.show();
                 
                             }
                        }
                    var msg = 'Are you sure.';
                    var title = 'Pawn Item'
                    Ext.MessageBox.confirm(title, msg, myCallback);        
                }
        }

  2. #2
    Sencha User lordmax's Avatar
    Join Date
    Jul 2009
    Location
    Turin, Italy
    Posts
    7

    Default

    My problem too.
    It seems that window.print do a printscreen

    Anyone can help?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •