daily pastebin goal
64%
SHARE
TWEET

цйу12

hxxxrz Mar 13th, 2018 (edited) 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. printButtonClicked: function(){
  3.     // immediately open a new pop up window, but fill it with content later, when ajax request will be completed            
  4.     var id = (new Date()).getTime();
  5.     var myWindow = window.open(window.location.href + '?printerFriendly=true', id, "toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=800,height=600,left = 240,top = 212");
  6.  
  7.     $.post("/ajax/friendlyPrintPage", postData)
  8.         .done(function(htmlContent) {
  9.             myWindow.document.write(htmlContent);
  10.             myWindow.focus();
  11.         });
  12. }
  13. </script>
  14.  
  15. <a href="http://www.yahoo.com" onclick="return printButtonClicked(this)">yahoo</a>
  16. <a href="http://www.msn.com" onclick="return printButtonClicked(this)" target="MSN">MSN</a>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top