Skip to Content
avatar image
Former Member

Print a fragment SAP UI5

I am trying to print a fragment using window.print() but not getting the expected output. I am using below code :

var $domTarget = oTarget.mAggregations.content["0"].mAggregations.content["0"].mAggregations.pages["0"].mAggregations.content["0"].$()[0];var sTargetContent = $domTarget.innerHTML;var sOriginalContent = document.body.innerHTML;
document.body.innerHTML = sTargetContent;
window.print();

I am getting first half of fragment printed but not second half.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 19 at 09:42 PM

    Hi,

    Are you not getting the part that is in sTargetContent printed?

    Add comment
    10|10000 characters needed characters exceeded