Results 1 to 2 of 2

Thread: Opening a new window with a new style

  1. #1
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Opening a new window with a new style

    1) Script Title: Style Sheet Switcher (v1.1)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...etswitcher.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):

    Code:
    <a href="javascript:chooseStyle('printfriendlyversion', 60)" target="new window">[Printversion]</a>
    Is this a limitation of the script?

    Kind regards,
    Jim
    Last edited by jimbound; 02-15-2007 at 04:43 PM. Reason: forgotten code

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    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:
    Code:
    <link rel="stylesheet" href="printfriendlyversion">
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •