View Full Version : Styleswitch not working in IE7 (but works in FF, Opera)

03-05-2008, 02:08 AM
1) Script Title: Style Sheet Switcher v1.1

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

3) Describe problem:

On my site www.icdmeister.com/site/ (http://www.icdmeister.com/site/), the script works properly in FF and Opera but doesn't work in IE7 (haven't tried IE6 yet).

In IE7, when I click the button to change the stylesheet the page refreshes but doesn't seem to apply the new stylesheet. I've reviewed the forum and found this similar thread (http://www.dynamicdrive.com/forums/showthread.php?p=50295)from a year and a half ago. I tried to change the styleswitch.js file as described in that thread (http://www.dynamicdrive.com/forums/showpost.php?p=48766&postcount=6) but it didn't fix the problem in IE7 and also made the script not work in FF and Opera.

I see that version 1.1 of the script (the version I'm using) was released after this discussion but (at least in my case) it doesn't seem to have resolved this issue.

Any help would be very welcome!



03-05-2008, 06:04 AM
Actually in FF2, clicking on the 3 "As" doesn't seem to make a difference visually for me either. By working in FF and Opera, what do you mean?

03-05-2008, 03:34 PM
Sorry I should have specified that the home page at icdmeister.com/site/ is not set to change font size but every other page is.

Click on any link in the content area or on the left nav bar then click one of the A's to change the font size and you (hopefully) will see what I'm seeing - that it works properly in FF but not in IE.



03-07-2008, 03:22 AM
A little more information . . .
Not sure what was going on but this problem seems to have resolved itself.

Sorry for wasting your time. Great tool!


04-29-2008, 11:26 PM
I've setup Style Sheet Switcher on my site:
(note: style sheet changes are not incorporated on the home page but are active on all other pages - click any link from the start page to explore).

In IE7, the change of styles works without a hitch but it doesn't seem to retain the style when one moves on to other pages in the site. This isn't happening in FF.

Any ideas?


04-30-2008, 04:32 PM
I'm a bit baffled. After hours of trying different variations, now it all seems to be working properly again in both IE and FF. The only thing I can think of that might have made the difference is changing the style sheet changing event from onMouseDown to onClick. Not sure why that would matter but . . . all's well now.