location of cookie
October 19, 2007 12:00 AM
Rupert:Something not taken advantage of is the fact that the frameset itself can maintain session variables so that you don't even have to maintain values in a cookie.Since the frameset(titlemanager (TitleMgr) object) is open and available all the time it can be used to store values needed from page to page. Values can be written dynamically into the TitleMgr object for later recall without affecting the cookie limitations.This can be done for values AND arrays of values. For example you can write javascript:TitleMgr.myObjectValue="yellow" on page one of your course and on page 400 you can request the value by javascript:alert(TitleMgr.myObjectValue) and an alert box will display the word "yellow". I'm using that capability currently to carry an array of values throughout a course browser session so I don't have to write out a cookie - ie. TitleMgr.myArrayOfValues=new Array(), and then pushing values onto the array. The only caveat seems to be that items can't be deleted off of the dtnamically written array - possibly some odd security issue - so a temp array has to be written, the values copied from the frameset array to the temp array, adjusted, the frameset array reinitialized, and the values written back to the frameset array from the temp Array - sounds worse then it really is....This solution works the same as cookies that exist only during a browser session. The benefit is that you don't hit the cookie ceiling...
Discussions have been disabled for this post