1

When someone clicks a button, it opens up a jquery-ui popup window (dialog).

I need to add 'print' button on this popup, so someone can print out the contents of the popup dialog.

is this possible? how can i do this?

Blankman
  • 259,732
  • 324
  • 769
  • 1,199

1 Answers1

4

There are a few plugins for this, like jqPrint (demo here), you can just add a print button that calls that functionality, for example:

$("#dialog").dialog({
  buttons: { 
    "Print": function() { $("#dialog").jqprint(); },
    "Close": function() { $(this).dialog("close"); }
  }
});
Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155