I have an application which uses jqplot to produce some graphs I want to have the ability to print the graph, and only the graph.
So I wrote a function a simple function that opens a new window containing the code from the graphdiv in the main page of the application. My problem is that the graph does not display properly in the new window. Any ideas??
function newwindow() {
var windowObject = window.open('', 'windowObject', 'arguments...');
windowObject.document.write("<html> <head><link rel='stylesheet' type='text/css' href='jquery.jqplot.css' /></head> <body onload=''><div class='jqplot-target'>" + $('#chartdiv').html() + "</div></body></html>");
windowObject.document.close();
}
Thanks.