printing certain div is not working correctly

guilherme.hcm

New Member
I am using datables plugin for drawing a table on my web app.But here is the problem.I have a print button which calls me this function:\[code\]function printHTML(clonedDive){ var iframe = document.createElement("iframe"); document.body.appendChild(iframe); iframe.contentWindow.onunload = function(){ $("#submenu").show("fast"); $(".content-secondary").animate({ width: '15%' }); $(".content-primary").animate({ width: '83%' }); }; iframe.contentWindow.document.body.appendChild(clonedDive); iframe.contentWindow.print(); document.body.removeChild(iframe); }\[/code\]This is how I call this function:\[code\]printHTML( document.getElementById("results").cloneNode(true));\[/code\]now \[code\]results\[/code\] div looks like this:\[code\]<div id="results"><table id="stops" width="100%" border="1" cellspacing="2" cellpadding="5" > <thead> <tr class="even"> </tr> </thead> <tbody> </tbody> </table> </br> <hr> <p id="title"><b>Map</b></p> <div id="map_find"> </div></div>\[/code\]So table is working like this: when you click on the row, the row got highlighted and map is shown. So problem is occurring when I click print button. On the print preview I can see the table but the row is not highlighted and the Google map is not shown. It seems like it is showing me the div that is firstly initialized and there is not highlighted rows and Google maps is not shown. What can I do?
 
Back
Top