Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print issue

Status
Not open for further replies.

priyapratheep1

Programmer
Oct 4, 2013
1
SG
Hi friends,

I need to do printing...I can do printing with the following 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

var actionMsg = actionMsgLabel.getText();
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
 
Try
Code:
myWindow.document.write('<div style="position:absolute;bottom:0;">' + actionMsg.body.dom.innerHTML + '</div>');
You can also choose whether you want it to be bottom left or right by setting the values accordingly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top