<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Client Side Web Development</title><link>http://forums.asp.net/130.aspx</link><description>Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=18&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2849548.aspx</link><pubDate>Tue, 06 Jan 2009 12:47:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2849548</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2849548.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2849548</wfw:commentRss><description>&lt;p&gt;The newer browsers prevent things like: left=50000 and top=50000 which is basically illegal code since it opens&amp;nbsp;the window off of the visible page. If you want that code to be browser independent, you&amp;#39;re just going to have to change it to left=0 and top=0 (or something in the viewing area)&amp;nbsp;and live with the print window showing momentarily.&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2849106.aspx</link><pubDate>Tue, 06 Jan 2009 08:50:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2849106</guid><dc:creator>sirdneo</dc:creator><author>sirdneo</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2849106.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2849106</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;This is the most efficent cross browser code, all the codes which i get works only on IE and not on firefox, but this code is working on both IE and FireFox. However In Firefox window does not open with left=50000 and top=50000 :( can any one solve this window issue for firefox&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2607849.aspx</link><pubDate>Mon, 08 Sep 2008 18:48:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2607849</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2607849.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2607849</wfw:commentRss><description>&lt;p&gt;First of all you should &lt;strong&gt;NOT&lt;/strong&gt; hijack someone else&amp;#39;s post. &lt;strong&gt;Start your own&lt;/strong&gt;. Try this because I can&amp;#39;t see how your code could possibly work.&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;function printPartOfPage(elementId)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var printContent = document.getElementById(elementId);&lt;br /&gt;&amp;nbsp;var windowUrl = &amp;#39;about:blank&amp;#39;;&lt;br /&gt;&amp;nbsp;var windowName = &amp;#39;Print&amp;#39; + new Date().getTime();&lt;br /&gt;&amp;nbsp;var printWindow = window.open(windowUrl, windowName, &amp;#39;left=50000,top=50000,width=0,height=0&amp;#39;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;printWindow.document.write(printContent.innerHTML);&lt;br /&gt;&amp;nbsp;printWindow.document.close();&lt;br /&gt;&amp;nbsp;printWindow.focus();&lt;br /&gt;&amp;nbsp;printWindow.print();&lt;br /&gt;&amp;nbsp;printWindow.close();&lt;br /&gt;}&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;div id=&amp;quot;printDiv&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;This is the content in the page to print&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Print&amp;quot; onclick=&amp;quot;JavaScript:printPartOfPage(&amp;#39;printDiv&amp;#39;);&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2607749.aspx</link><pubDate>Mon, 08 Sep 2008 17:48:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2607749</guid><dc:creator>jimmy2552</dc:creator><author>jimmy2552</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2607749.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2607749</wfw:commentRss><description>&lt;p&gt;The javascript works fine.&amp;nbsp; However, I receive an error when I&amp;nbsp;try sorting&amp;nbsp;my gridview&amp;nbsp;after clicking on the Print button&amp;nbsp;stating &amp;quot;theForm.__EVENTTARGET&amp;#39; is null or not an object.&lt;/p&gt;
&lt;blockquote&gt;&lt;span style="COLOR:blue;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;function printdiv(printpage)&lt;br /&gt;{&lt;br /&gt;var headstr = &amp;quot;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;quot;;&lt;br /&gt;var footstr = &amp;quot;&amp;lt;/body&amp;gt;&amp;quot;;&lt;br /&gt;var newstr = document.all.item(printpage).innerHTML;&lt;br /&gt;var oldstr = document.body.innerHTML;&lt;br /&gt;document.body.innerHTML = headstr+newstr+footstr;&lt;br /&gt;window.print(); &lt;br /&gt;document.body.innerHTML = oldstr;&lt;br /&gt;return false;&lt;br /&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;Do you have any suggestions on how to fix this situation?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2519092.aspx</link><pubDate>Mon, 28 Jul 2008 13:24:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2519092</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2519092.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2519092</wfw:commentRss><description>&lt;p&gt;mirainc, you can&amp;#39;t do this in VB.NET as this requires client-side functionality and needs to be done in JavaScript. VB.NET provides server-side functionality.&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2518511.aspx</link><pubDate>Mon, 28 Jul 2008 09:52:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2518511</guid><dc:creator>mirainc</dc:creator><author>mirainc</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2518511.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2518511</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;Hey blodfox777 &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;i want to know how do u implement the method in a VB.NET language?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;i too just want to print the content in content placeholder..&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2497125.aspx</link><pubDate>Thu, 17 Jul 2008 18:51:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2497125</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2497125.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2497125</wfw:commentRss><description>&lt;p&gt;The only way that you can convert to PDF is with a third party tool, and they cannot be used client-side (like printing). Most cost money. This one used to be free: &lt;a href="http://itextsharp.sourceforge.net/"&gt;http://itextsharp.sourceforge.net/&lt;/a&gt;, but I haven&amp;#39;t used it in a while, so I don&amp;#39;t know if it still is.&lt;/p&gt;
&lt;p&gt;NC..&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2497095.aspx</link><pubDate>Thu, 17 Jul 2008 18:44:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2497095</guid><dc:creator>nzamorski</dc:creator><author>nzamorski</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2497095.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2497095</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;It worked once I used your markup. Thank you for your help. Do you know an easy way for me to convert that same div tag to a pdf easily with a separate button?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2497061.aspx</link><pubDate>Thu, 17 Jul 2008 18:22:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2497061</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2497061.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2497061</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nzamorski:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;&amp;nbsp;That code did not work for me. Ideally I would like to just be able to click the print button and it would take all of the content from the place holder or the div and print it while keeping the formatting(font, size, color).&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Well it certainly worked for me and here is the markup that I used. I&amp;#39;m afraid that I would need more information to tell what your problem is.&lt;/p&gt;
&lt;p&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot;&amp;nbsp; CodeFile=&amp;quot;Default.aspx.cs&amp;quot; Inherits=&amp;quot;_Default&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;&lt;a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/a&gt;&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&amp;quot; &amp;gt;&lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Print Test&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;form id=&amp;quot;Form1&amp;quot; method=&amp;quot;post&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;style media=&amp;quot;print&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;.noPrint &lt;br /&gt;&amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;display: none;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;asp:button id=&amp;quot;postBackButton&amp;quot; runat=&amp;quot;server&amp;quot; text=&amp;quot;PostBack&amp;quot;&amp;gt;&amp;lt;/asp:button&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;HTML Button&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div id=&amp;quot;workDiv&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;workDiv contents&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;asp:TextBox ID=&amp;quot;TextBox1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;Text&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;div id=&amp;quot;divToPrint&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;divToPrint contents&amp;lt;br&amp;gt;Bla bla bla&lt;br /&gt;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;input type=&amp;quot;button&amp;quot; class=&amp;quot;noPrint&amp;quot; value=&amp;quot;Print&amp;quot; onclick=&amp;quot;printDiv(&amp;#39;divToPrint&amp;#39;);&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;function printDiv(divId)&lt;br /&gt;{ &lt;br /&gt;&amp;nbsp;var divArray = document.getElementsByTagName(&amp;#39;div&amp;#39;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;for (var i=0; i&amp;lt;divArray.length; i++)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;divArray[i].style.display = &amp;#39;none&amp;#39;; &lt;br /&gt;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;document.getElementById(divId).style.display = &amp;#39;block&amp;#39;; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;window.print();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;for (var i=0; i&amp;lt;divArray.length; i++)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;divArray[i].style.display = &amp;#39;block&amp;#39;;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;By the way, you can&amp;#39;t use a PlaceHolder since it exudes no markup.&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2497021.aspx</link><pubDate>Thu, 17 Jul 2008 17:58:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2497021</guid><dc:creator>nzamorski</dc:creator><author>nzamorski</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2497021.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2497021</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;That code did not work for me. Ideally I would like to just be able to click the print button and it would take all of the content from the place holder or the div and print it while keeping the formatting(font, size, color).&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2496995.aspx</link><pubDate>Thu, 17 Jul 2008 17:43:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2496995</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2496995.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2496995</wfw:commentRss><description>&lt;p&gt;Try this:&lt;/p&gt;
&lt;p&gt;&amp;lt;form id=&amp;quot;Form1&amp;quot; method=&amp;quot;post&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;style media=&amp;quot;print&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;.noPrint &lt;br /&gt;&amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;display: none;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;lt;/style&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;div id=&amp;quot;div1&amp;quot;&amp;gt;Div #1&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;div id=&amp;quot;div2&amp;quot;&amp;gt;Div #2&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;div id=&amp;quot;div3&amp;quot;&amp;gt;Div #3&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;div id=&amp;quot;div4&amp;quot;&amp;gt;Div #4&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;input type=&amp;quot;button&amp;quot; class=&amp;quot;noPrint&amp;quot; value=&amp;quot;HTML Button&amp;quot; onclick=&amp;quot;printDiv(&amp;#39;div1&amp;#39;);&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;function printDiv(divId)&lt;br /&gt;{ &lt;br /&gt;&amp;nbsp;var divArray = document.getElementsByTagName(&amp;#39;div&amp;#39;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;for (var i=0; i&amp;lt;divArray.length; i++)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;divArray[i].style.display = &amp;#39;none&amp;#39;; &lt;br /&gt;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;document.getElementById(divId).style.display = &amp;#39;block&amp;#39;; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;window.print();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;for (var i=0; i&amp;lt;divArray.length; i++)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;divArray[i].style.display = &amp;#39;block&amp;#39;;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/form&amp;gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2496918.aspx</link><pubDate>Thu, 17 Jul 2008 17:07:06 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2496918</guid><dc:creator>nzamorski</dc:creator><author>nzamorski</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2496918.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2496918</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I tried this code on my website and it works great in Internet Explorer, but does not work in Firefox(same problem as someone else). Did you ever figure out how to make it work in Firefox as well?&lt;/p&gt;&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2371893.aspx</link><pubDate>Wed, 21 May 2008 16:33:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2371893</guid><dc:creator>just_life</dc:creator><author>just_life</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2371893.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2371893</wfw:commentRss><description>&lt;p&gt;Tried it too. Still the blank page !! :-(&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2369893.aspx</link><pubDate>Wed, 21 May 2008 02:23:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2369893</guid><dc:creator>blodfox777</dc:creator><author>blodfox777</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2369893.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2369893</wfw:commentRss><description>&lt;p&gt;Hi &lt;strong&gt;just_life &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I suggest you try to use &amp;quot;onclientclick&amp;quot; instead of &amp;quot;onclick&amp;quot;&lt;/p&gt;
&lt;p&gt;hope this helps!&lt;/p&gt;</description></item><item><title>Re: How to print DIV contents only</title><link>http://forums.asp.net/thread/2369322.aspx</link><pubDate>Tue, 20 May 2008 17:32:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2369322</guid><dc:creator>just_life</dc:creator><author>just_life</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2369322.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2369322</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;When I tried it, I got a blank page!! &lt;/p&gt;&lt;p&gt;I have the undermentioned on myprint.js page&lt;br /&gt; &lt;/p&gt;&lt;p&gt;function printdiv(printpage)&lt;br /&gt;{&lt;br /&gt;var headstr = &amp;quot;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;quot;;&lt;br /&gt;var footstr = &amp;quot;&amp;lt;/body&amp;gt;&amp;quot;;&lt;br /&gt;var newstr = document.all.item(printpage).innerHTML;&lt;br /&gt;var oldstr = document.body.innerHTML;&lt;br /&gt;document.body.innerHTML = headstr+newstr+footstr;&lt;br /&gt;window.print(); &lt;br /&gt;document.body.innerHTML = oldstr;&lt;br /&gt;return false;&lt;br /&gt;}&amp;nbsp;&lt;/p&gt;&lt;p&gt;on my code page I have:&lt;/p&gt;&lt;p&gt;&amp;lt;asp:Button ID=&amp;quot;PrintAns&amp;quot; runat=&amp;quot;server&amp;quot; Style=&amp;quot;z-index: 105; position: relative;top: 55px; left:245px;width: 50px&amp;quot; onclick=&amp;quot;printdiv(&amp;#39;&lt;b&gt;content&lt;/b&gt;&amp;#39;);&amp;quot; Text=&amp;quot;Print&amp;quot; /&amp;gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;where &amp;quot;content&amp;quot; is the div id whose contents I wish to print.&lt;/p&gt;&lt;p&gt;Could anyone please help in figuring out what I&amp;#39;m doing wrong?&lt;/p&gt;&lt;p&gt;Thank You&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>