I have a php page that has a chart, date picker (calendar) and a few buttons.
I want to add another "Print Chart" button, which ONLY prints the chart, not the entire page, in the local printer.
I am trying to do this with another script (which only displays a chart) and using the javascript function 'window.print'
HTML
<input type="button" onClick="printChart()" value="Print Chart">
Javascript
function printChart(){ var myParameters = window.location.search;
I tried the above code - it does not work. A blank page is printed.
Is there a way to print the destination URL? If so, is it possible to print it without opening a new window?
thank you for your time
source share