|
Post by blueisland on Sept 8, 2021 14:18:18 GMT
I an making a dropdown menu to select a language which redirects to the relevant page but I want to set a cookie to remember this choice.
Any ideas how I can do this
Thanks
|
|
|
Post by J on Sept 10, 2021 9:56:42 GMT
Hi Blueisland,
Just an idea for one approach that you can adapt. Antenna has a few built in cookie functions that can help. On the destination page, perhaps in the OnLoad event, you could set a cookie like this:
cookieWrite('language','french',15);
That sets a cookie named 'language' and the browser will retain it for 15 days. Or you could set the cookie at the point of selection instead. Then on the start page you could check to see whether the cookie already exists:
if (cookieExists('language')) { var value=cookieRead('language'); //Do something with the value here e.g. redirect }
Cheers, J
|
|