Hi. Is there any predefined JavaScript method to destroy cookie?

asked 07 Apr '13, 02:19

Javid%20Hasanov's gravatar image

Javid Hasanov
16
accept rate: 0%


Hi Javid,

You can destroy a cookie using the predefined setCookie JavaScript method explained in this tutorial. After creating an externalMethod as explained in the tutorial(named "setUserCookie" for example), you can use null as cookie value and -1 as cookie duration to destroy it:

procedure destroyCookie is
  v_params_t  api_externalMethod.tt_params;
begin 
  -- cookie name
  v_params_t('0').value_tx := 'cookieName';
  -- cookie value
  v_params_t('1').value_tx := '';
  -- cookie duration
  v_params_t('2').value_tx := -1;
  api_externalMethod.invoke('setUserCookie', v_params_t);
end;

Hope this helps,
Ibrahim

link

answered 08 Apr '13, 04:23

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

edited 08 Apr '13, 04:24

Grat Thanks Ibrahim. It's worked for me.

(08 Apr '13, 05:11) Javid Hasanov
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3
×1

Asked: 07 Apr '13, 02:19

Seen: 1,704 times

Last updated: 08 Apr '13, 05:11


© Copyright Gerger 2017