css - How to open current page in a new tab with print stylesheet only? -


i have separate stylesheet print. want create button opens current page stylesheet implemented , ignoring rest. if helps doing in angularjs.

this link stylesheet:

<link rel="stylesheet" href="css/printer-friendly.css"  media="print"> 

i tried changing default css page by:

<script>   function changestyle( themename ){ document.getelementbyid( "basestyle" ).href= themename+ ".css"; } </script 

the problem rest of stylesheets interfering.

create version of same page using new style sheet , link using target='_new'

<a target='_new' href='version_of_page_using_that_sheet_only'>print</a> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -