# Print disabling dialog box

**URL:** <https://www.ruby-forum.com/t/print-disabling-dialog-box/172377>\
**Category:** Rails\
**Created:** [July 20, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/print-disabling-dialog-box/172377 "2009-07-20T19:16:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [July 20, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/print-disabling-dialog-box/172377/1 "2009-07-20T19:16:58Z")

</div>

Hello,  
I need a functionality where i can print out the content on just one  
click  
with out dialog box alert. So is it possible with ruby on rails?

Thanks

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [July 20, 2009, 9:49pm UTC](https://www.ruby-forum.com/t/print-disabling-dialog-box/172377/2 "2009-07-20T21:49:34Z")

</div>

On Mon, 2009-07-20 at 22:46 +0530, Abhishek shukla wrote:

> Hello,  
> I need a functionality where i can print out the content on just one  
> click with out dialog box alert. So is it possible with ruby on rails?

This is a function of the browser, not of Rails.

In Firefox there’s a setting in about:config (you may have to manually  
add the setting to prefs.js) named print.always\_print\_silent. It sends  
print jobs directly to the default printer without the dialog.

In general, you do NOT want to do this. The alert dialog exists to  
prevent DoS attacks on your network. I don’t know if / which other  
browsers even allow it.

HTH,  
Bill
