Skip to Content
author's profile photo
Former Member

Write and Read Cookies in Web template

Hi,

How to write and Read cokies in BW Web Template ?

I had create function with javascript but is not working when I read the cookies,

here my function

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(indcookieName.length1,ind1));

}

function SetCookie(cookieName,cookieValue,nDays) {

var today = new Date();

var expire = new Date();

if (nDays==null || nDays==0) nDays=1;

expire.setTime(today.getTime() + 360000024nDays);

document.cookie = cookieName"="escape(cookieValue)

+ ";expires="+expire.toGMTString();

}

after I check BW server generate my cookies in defferent type is not same in normal server, here my cookies:

currState

0110000000000000000000000000000000000000000000000000000000000000000000000000001000111010000100001000000000000000000000000000000000000000000000000000000000000100000010100000000000000000000000000000

trsbd1/sap/bw/

1088

1525984128

29686307

846566896

29684899

*

currFolder

8

trsbd1/sap/bw/

1088

1525984128

29686307

847266896

29684899

*

division

5

trsbd1/sap/bw/

1088

2280544128

29685682

1574330624

29685481

*

thanks in advance

supriatna

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Jan 11, 2005 at 02:13 PM

    Hi all,

    I am also looking to read and write cookies from web template. But, I am not able to set the cookies in the right path on the BW server. Does any body know how exactly it is done?

    Many thanks

    Add comment
    10|10000 characters needed characters exceeded