# scripting the print button of the print preview

**URL:** <https://forum.servoy.com/t/scripting-the-print-button-of-the-print-preview/2125>\
**Category:** Classic Servoy\
**Created:** [July 1, 2004, 12:28pm UTC](https://forum.servoy.com/t/scripting-the-print-button-of-the-print-preview/2125 "2004-07-01T12:28:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [July 1, 2004, 12:28pm UTC](https://forum.servoy.com/t/scripting-the-print-button-of-the-print-preview/2125/1 "2004-07-01T12:28:12Z")

</div>

Hai,

I would like to run an ‘onAction’ method after hitting the buttons (but at least the print button) on the print preview. Would that be possible?

---

<div class="post-metadata">

**Author:** ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)\
**Post date:** [July 5, 2004, 12:20pm UTC](https://forum.servoy.com/t/scripting-the-print-button-of-the-print-preview/2125/2 "2004-07-05T12:20:42Z")

</div>

what whould you like todo? other than printing?

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [July 5, 2004, 12:29pm UTC](https://forum.servoy.com/t/scripting-the-print-button-of-the-print-preview/2125/3 "2004-07-05T12:29:59Z")

</div>

Example:

- ask for a confirmation after printing. When I want to show a dialog after printing I can just call it after a controller.print()… When I do that when I do a controller.printPreview() the dialog shows up on top of the preview.
