Team:Freiburg/Project/toolkit

From 2013.igem.org

(Difference between revisions)
Line 9: Line 9:
############################################################################## -->
############################################################################## -->
 +
 +
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script>
 +
<script type="text/javascript">
 +
 +
    function PrintElem(elem)
 +
    {
 +
        Popup($(elem).html());
 +
    }
 +
 +
    function Popup(data)
 +
    {
 +
        var mywindow = window.open('', 'my div', 'height=400,width=600');
 +
        mywindow.document.write('<html><head><title>my div</title>');
 +
        /*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
 +
        mywindow.document.write('</head><body >');
 +
        mywindow.document.write(data);
 +
        mywindow.document.write('</body></html>');
 +
 +
        mywindow.print();
 +
        mywindow.close();
 +
 +
        return true;
 +
    }
 +
 +
</script>
 +
 +
<script type="text/javascript">
<script type="text/javascript">
Line 734: Line 761:
</ol>
</ol>
 +
 +
<input type="button" value="Print Div" onclick="PrintElem('#check-7')" />
</div>
</div>

Revision as of 09:56, 30 September 2013