Problem with JS handling

View: New views
3 Messages — Rating Filter:   Alert me  

Problem with JS handling

by Tapio Markula-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I tested a possible menu system in a plugin, which use with JS cookies.
This hanged in IE 6 - not real IE 6 but multiple IE

        function ReadCookie(cookieName) {
                var theCookie=""+document.cookie;
                var ind=theCookie.indexOf(cookieName);
                if (ind==-1 || cookieName=="") return "";
                var ind1=theCookie.indexOf(";",ind);
                if (ind1==-1) ind1=theCookie.length;
                return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
        }
        ...
        function saveLevel2(value) {
        ...
               
                var name2 = "level2PrevItem";
                date.setTime(date.getTime()+(24*60*60*1000));
                var expires = "; expires="+date.toGMTString();
                document.cookie = name2+"="+value+expires+"; path=/";
        }
        ...
        function closePrevLevel2(value) {
                var previousItem = ReadCookie("level2PrevItem");
                if(value!=previousItem) {
                        tx_dropdownsitemap_pi1_swapClassesClose(previousItem);
                }
        }

I tested the last function with a fixed value - worked - so the problem
relates with cookie handling. I just doesn't understand why this doesn't
worked in multiple IE.
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: Problem with JS handling

by Georg Ringer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tapio Markula wrote:
> I tested the last function with a fixed value - worked - so the problem
> relates with cookie handling. I just doesn't understand why this doesn't
> worked in multiple IE.

Multiple IE is still kind of hack, so test it with a true IE6

maybe you also should ask this in a js forum

Georg
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: Problem with JS handling

by Tapio Markula-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Georg Ringer kirjoitti:
> Tapio Markula wrote:
>> I tested the last function with a fixed value - worked - so the
>> problem relates with cookie handling. I just doesn't understand why
>> this doesn't worked in multiple IE.
>
> Multiple IE is still kind of hack, so test it with a true IE6
True - my client tested with real IE and no problems.
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev