I'm having trouble getting Google Chrome to print the correct content when I change the content of a modal page with JavaScript. This is my code:

JavaScript:
Code:
function printCoupon(couponID)
{
  var originalContents = document.body.innerHTML;
  var printable = document.getElementById(couponID);
  var printContents = printable.innerHTML;

  document.body.innerHTML = printContents;

  window.print();

  document.body.innerHTML = originalContents;
  document.getElementById(couponID).scrollIntoView(true);
}
HTML:
Code:
<body>
  <div id="coupon1"><p>Coupon 1 contents</p></div>
  <div><a href="javascript:void(0)" onclick="printCoupon('coupon1');return false;">Print Coupon</a></div>
  <div id="coupon2"><p>Coupon 2 contents</p></div>
  <div><a href="javascript:void(0)" onclick="printCoupon('coupon2');return false;">Print Coupon</a></div>
</body>
This works in IE8 and FF 3.6, but Chrome 16 prints the original content, not the printable content.