HI,
i've written a php app that will generate a table on page.
So basically, i want to make users able to take print of this page.
I've written javascript that'll do the job.
here's the code -
HTML Code:
<script type="text/javascript">
function print(){
opt="";
document.execCommand("print","",opt);
}
</script>
and html -
PHP Code:
echo '<button onclick="print()">Print</button>';
this runs very well on chrome and IE.
But i can't run it on firefox. i'm using FF 5.
I know javascript behavior varies with browsers. So there are compatibility issues. Does anyone know how to solve this or link might be helpful.
__________________
Make everything as simple as possible, but not simpler. — Albert Einstein
Please login or register to view this content. Registration is FREE
|