www.webdeveloper.com
Results 1 to 2 of 2

Thread: problem in printing

  1. #1
    Join Date
    May 2008
    Posts
    5

    problem in printing

    Hi friends,

    I need to do printing...I can do printing with the following code

    Code:
     var targetElement = Ext.getCmp('bidAssessmentGrid');
                            var myWindow = window.open('', '', 'width=200,height=100');
    		        myWindow.document.write('<html><head>');
    		        myWindow.document.write('<title>' + 'Title' + '</title>');
    		        myWindow.document.write('</head><body>');
    		        myWindow.document.write(targetElement.body.dom.innerHTML);
    		        myWindow.document.write('<br>');
    		        myWindow.document.write('</body>');
    		        
    		        myWindow.document.write('</html>');
    		        myWindow.print();
    		        myWindow.close();
    Now my problem is i need to add the value of label too with this printing .I added the line

    Code:
    var actionMsg = actionMsgLabel.getText();
    and
    Code:
    myWindow.document.write(actionMsg .body.dom.innerHTML);
    .actionMsg is printing in the middle of the page .I need to print at the bottom of the page..

    Any help is much appreciated

    Thanks in advance

  2. #2
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,271
    Use css with a media="print" to control all elements of the page...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles