html - Whats the best way to print a dynamic table in javascript? -
i using datatables.net library don't print output (instead, format own printable table looks different style of data-table, keep data-table style display non-print purposes).
one option library has export data table javascript object, can access data datable , whatever want.
so options solution be:
1) create separate html page table & css prepared , printing via window.open() query string parameters , window.print() on-load of that.
2) same #1 big hidden input field , form post/request.
3) stay on same page, dynamically draw table, hide don't want print, window.print(), remove dom newly added table , re-show non-printable stuff.
what guys think, 1 of solution, or there better option? note: data-set not massive, as 30 rows , 10 columns.
well nobody seems have input on yet ive decided move forward using form post method & hidden fields. example of can seen here:
posting javascript , creating hidden field on fly
that link points answer on else's questionupdate: solve issue had end using window.opener below link more did think above:
(that link points answer on else's question)
Comments
Post a Comment