Results 1 to 3 of 3

Thread: Style Sheet Switcher with iFrames

  1. #1
    Join Date
    Jan 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Style Sheet Switcher with iFrames

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

    2) Script URL (on DD):
    3) Describe problem: I am using iFrames, and when I select a theme. It doesn't load it for the complete page. If you refresh, it loads the selected theme.
    Last edited by SteveToms; 12-03-2013 at 02:11 AM.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,009
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Firstly, your website is impossible to navigate on iPhone - hugely large and doesn't shrink to fit the viewport. It also keeps crashing when I try to change your switcher. This is another matter entirely but it means that I can only really make suggestions for your queried problem.

    I imagine the frames are what is causing the 'half-switch' - the stylesheet immediately changes in the document where the select options are located, but until there is a refresh, the cookie cannot apply the change to the other framed documents that make up your site 'page'. A workaround for this could be to add a refresh option into the select menu for the style switcher - to force a page refresh on theme selection.

    A reload could be as simple as this;
    Code:
     <select onchange="location.reload()">
    I haven't tested but here are two examples for reference;

    http://stackoverflow.com/questions/1...ect-box-option

    http://stackoverflow.com/questions/1...page-on-select
    Last edited by Beverleyh; 11-30-2013 at 04:53 PM.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Jan 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Beverleyh View Post
    Firstly, your website is impossible to navigate on iPhone - hugely large and doesn't shrink to fit the viewport. It also keeps crashing when I try to change your switcher. This is another matter entirely but it means that I can only really make suggestions for your queried problem.

    I imagine the frames are what is causing the 'half-switch' - the stylesheet immediately changes in the document where the select options are located, but until there is a refresh, the cookie cannot apply the change to the other framed documents that make up your site 'page'. A workaround for this could be to add a refresh option into the select menu for the style switcher - to force a page refresh on theme selection.

    A reload could be as simple as this;
    Code:
     <select onchange="location.reload()">
    I haven't tested but here are two examples for reference;

    http://stackoverflow.com/questions/1...ect-box-option

    http://stackoverflow.com/questions/1...page-on-select

    It works, thank you. I changed it back to test some other stuff. New problem, it won't remember the chosen style. At least not in the drop down menu.

Similar Threads

  1. Style Sheet Switcher- 30 max Css's for IE?
    By phearfactor in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 05-29-2012, 07:49 PM
  2. Resolved Style Sheet Switcher (v1.1)
    By Sartavius in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 09-26-2011, 01:22 AM
  3. Style Sheet Switcher (v1.1) - random style on every new site visit
    By matteus in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 07-07-2008, 04:09 PM
  4. A little help with Style Sheet Switcher 1.1
    By rhlblue in forum Dynamic Drive scripts help
    Replies: 9
    Last Post: 02-02-2008, 01:25 PM
  5. Style Sheet Switcher (v1.0) - IE does not remember style
    By miodrag in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 06-02-2006, 01:13 AM

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
  •