<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Val Petruchek on Web-Development &#187; javascript</title>
	<atom:link href="http://petruchek.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://petruchek.com</link>
	<description>PHP, JavaScript, MySQL, Apache, CSS</description>
	<lastBuildDate>Sun, 13 Sep 2020 18:58:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Funny “Print preview failed” bug in Google Chrome</title>
		<link>http://petruchek.com/2011/10/print-preview-failed/</link>
		<comments>http://petruchek.com/2011/10/print-preview-failed/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 09:00:07 +0000</pubDate>
		<dc:creator>val</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[print]]></category>

		<guid isPermaLink="false">http://petruchek.com/?p=59</guid>
		<description><![CDATA[3 links to print current page in HTML: &#60;a href="#" onclick="window.print();"&#62;print it #1&#60;/a&#62; &#60;a href=&#8220;#&#8221; onclick=&#8220;window.print();return false;&#8221;&#62;print it #2&#60;/a&#62; &#60;a href=&#8220;javascript:window.print()&#8221;&#62;print it #3&#60;/a&#62; Question: What is wrong with one of them? Same links clickable: print it #1, print it #2, &#8230; <a href="http://petruchek.com/2011/10/print-preview-failed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>3 links to print current page in HTML:</p>
<p><code style="color:#000000;background:#ffffff"><span style="color:#a65700">&lt;</span><span style="color:#800000;font-weight:bold">a</span><span style="color:#274796"> </span><span style="color:#074726">href</span><span style="color:#808030">=</span><span style="color:#0000e6">"#"</span><span style="color:#274796"> </span><span style="color:#074726">onclick</span><span style="color:#808030">=</span><span style="color:#0000e6">"window.print();"</span><span style="color:#a65700">&gt;</span>print it #<span style="color:#008c00">1</span><span style="color:#a65700">&lt;/</span><span style="color:#800000;font-weight:bold">a</span><span style="color:#a65700">&gt;</span></code></p>
<p><span style="color:#a65700">&lt;</span><span style="color:#800000;font-weight:bold">a</span><span style="color:#274796"> </span><span style="color:#074726">href</span><span style="color:#808030">=</span><span style="color:#0000e6">&#8220;#&#8221;</span><span style="color:#274796"> </span><span style="color:#074726">onclick</span><span style="color:#808030">=</span><span style="color:#0000e6">&#8220;window.print();return false;&#8221;</span><span style="color:#a65700">&gt;</span>print it #<span style="color:#008c00">2</span><span style="color:#a65700">&lt;/</span><span style="color:#800000;font-weight:bold">a</span><span style="color:#a65700">&gt;</span></p>
<p><span style="color:#a65700">&lt;</span><span style="color:#800000;font-weight:bold">a</span><span style="color:#274796"> </span><span style="color:#074726">href</span><span style="color:#808030">=</span><span style="color:#0000e6">&#8220;javascript:window.print()&#8221;</span><span style="color:#a65700">&gt;</span>print it #<span style="color:#008c00">3</span><span style="color:#a65700">&lt;/</span><span style="color:#800000;font-weight:bold">a</span><span style="color:#a65700">&gt;</span></p>
<p>Question: What is wrong with one of them?</p>
<p>Same links clickable:  <a href="#" onclick="window.print();">print it #1</a>, <a href="#" onclick="window.print();return false;">print it #2</a>, <a href="javascript:window.print()">print it #3</a></p>
<p>Answer: first link launches print interface in Google Chrome but Chrome fails to render print preview because of “Print preview failed” error. All three links work fine in Firefox and IE.</p>
]]></content:encoded>
			<wfw:commentRss>http://petruchek.com/2011/10/print-preview-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
