PDA

View Full Version : Opening a new window with a new style



jimbound
02-15-2007, 04:41 PM
1) Script Title: Style Sheet Switcher (v1.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm

3) Describe problem:
This script works great. However, I am trying to make a "printer friendly version" of a page using this script, but can't make it working. A "printer friendly version" of a page implies that a new (smaller) target window is opened (with the same page) and the new (print friendly) style is applied on it.

I tried the following, but that doesn't work (it just loads a blank window):



<a href="javascript:chooseStyle('printfriendlyversion', 60)" target="new window">[Printversion]</a>


Is this a limitation of the script?

Kind regards,
Jim

mburt
02-15-2007, 04:47 PM
This script only allows to change the style on that page, not a page that opens in a blank window. You should open a new window and set the style for that page the traditional way:

<link rel="stylesheet" href="printfriendlyversion">