Jump to content

Print A Popup Window


Recommended Posts

Dear Friends, am building a new website, where readers can print the article the want.upon click on "print" a popup window appears. using window.print(); the main window(window behind the popup) and the popup window are printed. I want only the popup to be printed.here is the div of the popup window:

 <div class="window" id="popup3">  <header>  <div class="row">  <input type="submit" class="submit" value="print" onclick='send_toprint();' /></div>   <div class="section"><strong class="logo-print"><a href="#"><img src="" alt="image description" width="167" height="50" /></a></strong>   </div>   <div class="section">    <strong class="title">title goes here</strong>	<h1 id='titleprint'></h1>   </div> </header>  <p id='txtprint'>text goes here.</p> <footer> </footer>   </div>

Link to post
Share on other sites

You can use the same type of rules to target the popup for printing to make sure it shows up at 100% width and auto height. If you printed it now then it would appear on the paper at the same size it does on the screen instead of taking up the whole page.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...