Hey All,
I am trying to set cookies on button click using javascript and once cookies set I want to read that cookies and show in feedback message or in expression.
Is there any way to implement this?
My result is
document.cookie
'DEVICE_OS=windows; DEVICE_BROWSER=chrome; DEVICES_TYPE=phone; DEVICE_ORIENTATION=landscape; pageLoadedFromBrowserCache=true; result_test=true'
from above result want to read last cookie named as result test.
Note:I tried using HTTPRequestHandler ->GetCookie server action but its not reading cookie which place at last.
In runjavascript I had setting value for document.cookie.
document.cookie = 'result_test='+value+';path=/;expires='+dt.toGMTString()+';';
Thanks in advance
Yogesh
I got solution,i created javascript function at screen level and called same function inside javascript.
Thanks
Hello Yogesh,
you need to set cookies first then you will get the cookies for reference I have attached the Screen shot with both first set cookie with the value and get the same cookies where you want (one time set and used same cookie value every time)
Thanks and Regards,
Akshay Deshpande
Hi @Akshay Deshpande 🚀
Thanks for quick response.
I have written some javascript code using RunJavaScript from HTTPRequestHandler. I already set cookies inside RunJavaScript.
I want to read that cookies only which set using Javascript.
Any suggestion.
As far I know you. Need to set cookie in that action.if it's not work check for others rply.(check you are using the same name for cookies for set and get )