Results 1 to 3 of 3

Thread: Style Sheet Switcher (v1.1)

  1. #1
    Join Date
    Sep 2011
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Style Sheet Switcher (v1.1)

    Style Sheet Switcher (v1.1)
    2) Script URL (on DD):

    ---------

    Not really a problem, actually. I'm pretty iffy with JavaScript and other client side languages but I'd like to have this script set the style to both frames in a frameset. Is that possible without putting the script in each window and asking the user to set it manually for both?

    Yes I know frames are so vulgar and icky, but I have an oldschool legacy chat site that still uses them so they aren't going to change anytime soon.
    Last edited by Sartavius; 09-26-2011 at 01:25 AM. Reason: marking resolved

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    All the pages, including the frameset page have to be on the same domain. And there has to be just one frameset page at a time, you can't have a frameset page as a page in one of the frames. Well you could, but it would get more complicated, perhaps much more complicated.

    So if that's the story, here's what I'd do. First use this version of the script:

    Attachment 4106

    Put the script and the stylesheets on all of the pages except the frameset and any pages you don't want to change styles. Use the same script and stylesheets for all**. Make sure the style sheet switcher script on each of the individual pages is working. That will test to see that the paths to stylesheets and the script file are correct. Next, on your pages replace stuff like:

    Code:
    <input type="radio" name="choice" value="none" onClick="chooseStyle(this.value, 60)">Default style<br />
    with:

    Code:
    <input type="radio" name="choice" value="none" onClick="styleframes(this.value, 60)">Default style<br />
    The browser cache may need to be cleared and/or the page refreshed to see changes.

    Tested and works. If there are problems, let me know and give me a link to the page.



    **You could have different stylesheets on the pages, but they would have to have the same titles. You could have different scripts, but it would be a waste of space and bandwidth, they have to all be the same code anyway.
    Last edited by jscheuer1; 09-25-2011 at 05:04 AM. Reason: tested, works and attach file
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Sartavius (09-26-2011)

  4. #3
    Join Date
    Sep 2011
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Wow, thanks a ton! I didn't expect a reply that fast (or I would have checked again last night) nor did I expect to have someone actually work it out for me.

    Again - many, many thanks!!!

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
  •