Your Development & Design Resource
Repeat after me: @Functions are NOT for the web...
10/16/2007 11:02 PM by Chris Toohey
I won't go too much into this, but I was talking with a very competent
developer this afternoon who asked me how I could get a form to pop-up in a new
window, print, and then close said pop-up. This is a quick-and-simple trick,
and I won't get into the argument on doing this via a CSS for "Print", but just
state this: @Functions should NOT be used for functions on the
some forethought to application architecture - specifically, a view (we'll call
printform) for the printing.
From your view, add the following to create a link/action to the view:
Next, in the OnLoad for the
printform, add the following two
And there you have it - when clicked, the selected document will open in a popup window, auto-print, and then close itself!
For those of you interested in a sloppy, quickly-put-together demo, here ya go!
- Update -
I had to replace the download of this example - I accidentally enabled local encryption. And, for the record, I did mean that you should refrain from using @Formula for UI functions.