I’ve been trying to get a simple “print” link on my recent page to work. I set up a simple fiddle to show what I’m trying to do.
http://jsfiddle.net/bladnman/4Ux9U/
For some reason Chrome is complaining about:
TypeError: Property 'print' of object [object Window] is not a function
You know, this very very simple kind of thing. Been doing it for years:
<a href="#" onclick="window.print(); return false;">Click me to Print</a>
UPDATE #1:
Many users have reported that this is working fine for them on Chrome. I still see nothing but the error reported.
I did want to add my environment:
Version: 21.0.1180.89
OS: OSX Mountain Lion
UPDATE #2:
Big thanks to Arjen! It turns out that an extension (Better Popup Blocker) changed the DOM enough as to null out the “print” function on Window.
Thanks again everyone!
I didn’t have any issues with it, but I was able to reproduce the problem you were having on
Windows 7runningChrome 21.0.1180.89by enabling my popup blocker (I use Better Popup Blocker – Chrome Web Store) for jsfiddle.If you are using a popup blocker, try disabling it for jsfiddle / the site you are working with.