javascript - Print range images get by query in MYSQL- ASP.NET -
i require print range of images bring in query, range can large when printing mean choose whether want print range nose images if has javascript or asp. net.
<button name="printbutton" id="printbutton" type="button" class="btn btn-default" onclick= "printdiv('printablearea');" runat="server"> <span class="glyphicon glyphicon-print"></span> </button> </div> </div> </div> <div class="panel-body"> <div class="panzoom"> <div id="printablearea"> <img src="img/descarga.jpg" alt="visualizaciĆ³n del original de la forma migratoria" class="img-responsive" runat="server"> </div> </div> </div> </div> </section> </div> </div> </div> <script type="text/javascript"> function printdiv(divname) { var printcontents = document.getelementbyid(divname).innerhtml; var originalcontents = document.body.innerhtml; document.body.innerhtml = printcontents; window.print(); document.body.innerhtml = originalcontents; window.onfocus = function () { window.close(); } var $section = $('section').first(); $section.find('.panzoom').panzoom({ $zoomin: $section.find(".zoom-in"), $zoomout: $section.find(".zoom-out"), $zoomrange: $section.find(".zoom-range"), $reset: $section.find(".reset") }); }; </script>
as can see image inside div printed, try when send print ask if want print obtained through query, rank rank, or pages
in image show results
the image show in other panel,and user can print image,but want user can choose print range of images found inquiry ... ie results
you should attach html generated server...
anyway - don't think it's js problem. css can solve problem - should read media="print"
attribute, can apply css printed document. suggest generate divs display:none
attribute, , media="print"
overwrite show them all.
Comments
Post a Comment