image - print a specific div using javascript code -


i'm trying make printing code in javascript (asp.net) use code print specific div :

<script>         function callprinting(temp) {              var prtcontent = document.getelementbyid(temp);             var winprint = window.open('', '', 'letf=400px,top=100px,width=800px,height=500px,toolbar=0,scrollbars=1,status=0,');             winprint.document.write(prtcontent.innerhtml);             winprint.document.close();             winprint.focus();             winprint.print();             winprint.close();         }      </script>  <div id="print"> <img src=" [some source] " alt="" /> </div> <asp:button id="button1" runat="server" text="print" onclientclick="callprinting('print')" /> 

i make template paper , need print ... put problem image didn't appear in printing ... 'alt' appear alternative

any suggest ?


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -