Wednesday, November 2, 2011

How to Change information on something before you print.


Came across Phil Benwell's blog and found a snippet of javascript which is really handy. At first glance you say "What would I do with that", but let me tell you.

So here's the trick:
1) Head over to the web page you want to edit.

2) In the browser’s address bar, paste this code:
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

3) Now click on the part of the page you want to edit and start changing, deleting and adding text. [/quote]

Okay cool beans. My first thought as to where this would come in handy was my pay stubs. At work we use a completely paperless paycheck system. When someone requires proof of income, I merely pull up our company's HR intranet site, and print off the latest paycheck. But say I want to change something on the printout. Rather then downloading the HTML page, modifying it, and reloading it in the browser locally, this little piece of code might be really useful.... and I figured it was worth passing it on.

0 comments:

Post a Comment