Skip to Content

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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.