OK, so here goes with all of it. First the javascript portion:
<script type="text/javascript" language="JavaScript">
<!--
userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
function setStyleClass (classesOff,classesOn) {
var...
Well Tsuji,
I have added the code just as you provided it to my main page, and it doesn't work there for some reason. I am going to go through it slowly and add the changes that you made once at a time, to see what might have made it go from partially functional to not functional at all. I...
Well, that didn't take long. A little closer look at your code showed one small error which caused the problem for FF.
This line in the second loop:
if (document.styleSheets[s].cssRules[r].selectorText == '.' + classOn.toLowerCase())
Should be this:
if...
OK, this is great. I still have to study your code to see what you did differently, but now the styles work for me in chrome. Unfortunately, the functionality is not the same in Firefox. The styles turn off, but don't turn back on. I copied your code exactly into a test page, and it does...
Well, I thought that would be a good idea, and might fix the problem, but no such luck. I added all of the toLowerCase() statements, but the styles remain invisible when I try to view the pages in chrome. I don't have Safari installed here, but I could check it out if I had to.
Any other ideas...
Hello all,
I have a chunk of javascript that I use to turn styles on and off on my page, displaying lists of links to other pages on my site. It works great for IE and for FireFox, but does nothing at all in Safari, and Chrome. What am I missing?
Here is the code:
function setStyleClass...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.