Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- printButtonClicked: function(){
- // immediately open a new pop up window, but fill it with content later, when ajax request will be completed
- var id = (new Date()).getTime();
- 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");
- $.post("/ajax/friendlyPrintPage", postData)
- .done(function(htmlContent) {
- myWindow.document.write(htmlContent);
- myWindow.focus();
- });
- }
- </script>
- <a href="http://www.yahoo.com" onclick="return printButtonClicked(this)">yahoo</a>
- <a href="http://www.msn.com" onclick="return printButtonClicked(this)" target="MSN">MSN</a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement