Sounds like the logic then, but in your post you offer:
Code:
SetCookie("units", "Raw", 365);
Which is not the quirksmode code I recommend, perhaps it's just a typo. I cannot be sure (about either the code or the logic) without a link to the live page though.
Sounds like that might be unavailable. I can give you the basic outline of what I would do to begin to troubleshoot something like this. Say you have some code (using the quirksmode name for the function):
Code:
if(whatever)
createCookie("units", "Raw", 365);
The first thing you need to check is if the condition you are basing this upon is being seen by the browser. This is easily done:
Code:
if(whatever){
alert('attempting to set cookie units, value raw, days 365');
createCookie("units", "Raw", 365);
}
This strategy can be adapted to inline events like onclick, etc. If the browser doesn't alert, the problem isn't primarily the cookie code, it is that the condition or the event you are testing for hasn't been set/occurred at that point, as far as that browser sees it.
I can vouch for the quirksmode code working under IE 7. But, if there are issues surrounding your IE 7 settings, as might be indicated if it gives you the desired alert in a scenario like the above, but still doesn't set the cookie, this can be tested for by creating a very simple page with the sole purpose of setting and reading cookies, and loading that page in IE 7. You can also, as a preliminary test of the quirksmode code, try out the example (scroll down the page to Example) on their page I gave you the link to in IE 7. See if at least that works.
Oh, and I almost forgot, don't worry about finding the cookie in some directory or folder, even though (if you really know what you are doing) that can be a great diagnostic tool, but rather just see whether or not the cookie performs as expected.
Bookmarks