jQWidgets Forums
jQuery UI Widgets › Forums › Chart › Print Charts
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 9 years ago.
-
AuthorPrint Charts Posts
-
Good afternoon people!
I was testing the function for printing a graphic and unfortunately I could not, and alone I think I will take millions of years to achieve fix!
Please see if someone gives me an idea !!!
This is the div Grafico:
<Div id = ‘chartContainer’ style = “width: 100%; height: 550px” /> </ div>and this is the function to print:
$ ( “# PrintButton”). Click (function () {
var content = $ ( ‘# chartContainer’) [0] .outerHTML;
var newWindow = window.open ( ”, ”, ‘width = 800, height = 600’),
document = newWindow.document.open ()
PageContent =
‘<! DOCTYPE html>’ +
‘<Html>’ +
‘<Head>’ +
‘<Meta charset = “utf-8″ />’ +
‘<Title> Test </ title>’ +
‘</ Head>’ +
‘<Body>’ + content + ‘</ body> </ html>’;
�
try {
document.write (PageContent);
document.close ();
newWindow.print ();
newWindow.close ();
}
catch (error) {
alert (error);
}
});I suspect that the error may be related to how I am calling the js file and the folder that is the php file that contains the chart.
For example:
<script type=”text/javascript” src=”http://mysite.com.br/folder1/folder2/folder3/jqx2/scripts/jquery-1.11.1.min.js”></script>however the page that contains the application is in another directory, ex:
http://www.condeso.com.br/folder1/folder2/folder4/folder5/folder6/myapp.phpThe most curious thing is that the components work, receive the data normally, but the print function not!
Is this the problem, in the form of referring to the library or something else?
Ha,
when I use this feature,
function getExportServer() {
return ‘http://www.jqwidgets.com/export_server/export.php’;
}everything works perfectly, so I think the error may be the way directories are organized and how I call the files!
least the print logically!
Good Morning,
My question is too silly for you not answer me? Please help me!
Hi Francisco,
If you do not have the export.php, you have only the option to use the one hosted on our server. The file is only incuded in the source code packages for customers with Developer or Enterprise license.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.