# Print script

**URL:** https://forum.kirupa.com/t/print-script/274277
**Category:** web dev
**Created:** [October 27, 2008, 10:35pm UTC](https://forum.kirupa.com/t/print-script/274277 "2008-10-27T22:35:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NegroArg](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@NegroArg](https://forum.kirupa.com/u/NegroArg)
#### Post date: [October 27, 2008, 10:35pm UTC](https://forum.kirupa.com/t/print-script/274277/1 "2008-10-27T22:35:54Z")

</div>

Hi, I needed some help with a print script.

I’m using a traditional script for this, my script is:

function imprSelec(nombre)  
{  
var ficha = document.getElementById(nombre);  
var ventimp = window.open(’ ', ‘popimpr’);  
ventimp.document.write( ficha.innerHTML );  
ventimp.document.close();  
ventimp.print( );  
ventimp.close();  
}

The thing is that when the person click on the print button, the HTML that pops up looses the style and template… is there a way o a script so this doesn’t happen?. The thing is that a need a popup because the script is suppose to print a content html and not the hole page that has a template and thing I don’t want to print…

Any help is welcome!!!.. Thanks

Miguel
