[Cartoweb-users] Print from query
Oliver Christen
oliver.christen at camptocamp.com
Fri Aug 15 05:57:25 EDT 2008
Well, you need to display the query result html in a popup windows, then the
user can print that.
To do so, you need a bit of javascript, like this:
function popupResult() {
var win = window.open('','win1','width=800,height=600,menubar');
// copy the result html
var result = xGetElementById('tables_result');
// if you have your result in another element, simply put the id of the
query result container element
if (result) {
// past result into the popup window
win.document.body.innerHTML = result.innerHTML;
}
}
and add a link in the table.tpl to call that function.
if you want some styling, you can create an empty page in /htdocs/ with the
css file included in the header and use
window.open('path_to_the_empty_html_file.html','win1', ...
regards
Oliver
----- Original Message -----
From: "Lauber Christoph" <ch.lauber at geo-thun.ch>
To: "Oliver Christen" <oliver.christen at camptocamp.com>;
<cartoweb-users at lists.maptools.org>
Sent: Friday, August 15, 2008 10:35 AM
Subject: AW: [Cartoweb-users] Print from query
Hi Oliver
That means only that the information can be printed easily. Pdf format is
not needed. I imagine something like the sbb/cff (siwss trains) timetable on
the internet. Maybe it is just a browser function call?...
Regards Christoph
-----Ursprüngliche Nachricht-----
Von: Oliver Christen [mailto:oliver.christen at camptocamp.com]
Gesendet: Mittwoch, 13. August 2008 08:34
An: Lauber Christoph; cartoweb-users at lists.maptools.org
Betreff: Re: [Cartoweb-users] Print from query
Hi Christoph
print as in "export in a pdf" or "some nicely formated html in a
popup-or-whatever that can be easily printed" ?
> Hi list
>
> Is there a simple possibility to print directly the returned values from a
> query? Like it is done for cvs export with the exportCsv plugin.
>
>
>
> Mit freundlichen Grüssen
>
>
> Christoph Lauber
>
> Dütschler & Naegeli, Vermessung+Geoinformation AG
> Fliederweg 11, Postfach, 3601 Thun
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
More information about the Cartoweb-users
mailing list