Reputation: 458
I want to print web page, so I placed button like this.
<a href="javascript:staffinfoprint()"><b>print</b></a>
........
function staffinfoprint()
{
window.print();
}
When I click a tag, the web page is supposed to be printed.
But I got errors in google browser console as follows;
"Access to XMLHttpRequest at 'https://www.google.com/cloudprint/printer?xsrf=&hl=en-GB&printerid=__google__docs&use_cdd=true&printer_connection_status=true' from origin 'chrome://print' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource".
And the preview window was not opened.
How can I solve this issue?
Upvotes: 1
Views: 257