0

I am getting permission denied for 'print' property

    function printTrigger(elementId) {
        var getMyFrame = document.getElementById(elementId);
        getMyFrame.focus();
        getMyFrame.contentWindow.print();
    }
</script>

1 Answers1

0

To me this question is poorly described but I will give it a shot.

<script type="text/javascript">
function doit() {
    if (!window.print) {
        alert("You need NS4.x to use this print button!")
        return
    }
    window.print()
}
</script>
<a href="javascript:doit()"><img src="icon-48-print.png" border=0 align="middle">

If that doesnt work I would like to redirect you to a "Possible copy" of a similar post.
Firefox 19 print PDF from JavaScript

Community
  • 1
  • 1
JohnA
  • 564
  • 1
  • 5
  • 20