Hello,
I have this code to print window…
$(document).ready(function() {
$('ul#tools').prepend('<li class="print"><a href="#print">Click me to print</a></li>');
$('ul#tools li.print a').click(function() {
window.print();
return false;
});
});
it's working fine.
It´s possible to print HTML into function, so as window.print be called after the on_after_update method, non using link?
Thanks
Hello,
I have found this code…
<html>
<head>
<script language="javascript">
function printdiv(printpage)
{
var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr = document.all.item(printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr+footstr;
window.print();
document.body.innerHTML = oldstr;
return false;
}
</script>
<title>div print</title>
</head>
<body>
//HTML Page
//Other content you wouldn't like to print
<input name="b_print" type="button" class="ipt" onClick="printdiv('div_print');" value=" Print ">
<div id="div_print">
<h1>The Div content which you want to print, this use row data in diferents var to print</h1>
</div>
</body>
</html>
Idea is to print data of the row when click or on_after_update method.
Thanks by your help
For example:
In action Col, there is a Print button to open Print dialogue with dinamic data taken from Row.
Thanks again!