diasansley Posted June 27, 2011 Share Posted June 27, 2011 here is my code it is a js function popup!! for printing the data i get . Now as per the current code if i click on print in the preview it shows me the parent content in the background as well! IS there a way to this! function popUp(){ document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block'; //var formData = document.getElementById('profile_info').innerHTML; var formData = "<div class='tabconten_1'>"; formData = formData + "<a id='closemenupop' href='javascript:close();' ></a>"; formData = formData + "<div id='logo1'></div></div>"; formData = formData + "<div class='tabconten_1'></div>"; formData = formData + "<div class='tabconten_1'>"+document.getElementById('profile_info').innerHTML+"</div>"; formData = formData + "<div class='tabconten_1'></div>"; formData = formData + "<div class='tabconten_1'></div>"; formData = formData + "<a class='searchbtn1' href='javascript:window.focus();window.print();' >Drucken</a>"; document.getElementById('light').innerHTML = formData ; //popUp_second(); } <div id="light" class="white_content"> </div> <div id="fade" class="black_overlay"></div> Thanks Quote Link to comment https://forums.phpfreaks.com/topic/240502-javascript-print-not-printing-correctly/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.