I have a database that I’m web-enabling for anonymous access (read-only.) We have a list of folders in a dropdown in the top frame; the user then clicks a choice which opens in the bottom frame. Works fine.
What I want to do is give the users a “Set default folder” link so that they can automatically open the database to the chosen folder. I’ve set up a link in the $$ViewTemplateDefault that sets a cookie, then set up the bottom frame content formula to check for the cookie. If it exists, set the contents to the folder referenced by the cookie. If there is no cookie, open a specific view.
This works beautifully in Firefox, but doesn’t seem to do anything at all in IE6. Can anyone give me an idea why? Or just tell me how to debug cookie values in IE - I use Firebug in FF, and love it.
I get the feeling this has something to do with IE security settings, but since I don’t use IE, I’m not really sure what the settings need to be to allow this. Unfortunately most of our users do use IE, so this needs to work.
Here’s the code that sets the cookie. The function itself is in the JSHeader of the $$ViewTemplateDefault; it’s called by a link.
expirationDate = new Date
expirationDate.setMonth(expirationDate.getMonth()+12)
function setListCookie(newList)
{
document.cookie = "defaultListName="+newList+";expires=" + expirationDate.toGMTString()
}
It’s called by an action hotspot set to use JavaScript for the web client:
setListCookie(document.forms[0].viewTitle.value)
The code to retrieve the cookie and set the frame contents:
Cookies:=@GetHTTPHeader(“Cookie”); defaultListName:=@Middle(Cookies;“defaultListName=”;“;”);
cookieValue:=@Right(Cookies; “=”);
@If(Cookies=“”; “webWelcome?Open”; cookieValue+“?Open”)