197
Views
4
Comments
Access sessionStorage
Question

Referring to this article, https://www.w3schools.com/html/html5_webstorage.asp, is there any server action to retrieve sessionStorage?

If there is none, how can I set the value of sessionStorage (through Javascript) to a local variable in Preparation?

2023-07-28 17-00-32
Marco Arede
 
MVP

Christopher wrote:

Referring to this article, https://www.w3schools.com/html/html5_webstorage.asp, is there any server action to retrieve sessionStorage?

If there is none, how can I set the value of sessionStorage (through Javascript) to a local variable in Preparation?

Hi Christopher,

You can see this document, then use the explanation in your link, to extend your application code:

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/JavaScript/Extend_Your_Web_Application_Using_JavaScript/Define_and_Run_JavaScript_Code


2019-02-07 07-58-20
EnthusiaticNewbie

Dear Marco

Let me reword to ensure we are at the same page.

What i want is to get the value into a local variable (the yellow icon defined inside a webscreen), not the local variable of a javascript function. 

I know how to define and run javascript code but How do you assign the value from a javascript to the local variable?

Can you give me a quick simple example? 

2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Christopher,

Yes, maybe you want to check this post:

https://www.outsystems.com/forums/discussion/40098/how-to-assign-javascript-value-to-out-system-local-variable/

Basically you assign the local variable to an input that is hidden and you modify by javascript. Does this solves your question? 

2025-01-07 17-06-54
Paulo Cação
Champion

Hi Christopher,


Please, check this plugin: https://www.outsystems.com/forge/component-overview/4990/local-storage


I think you have everything you need. Read the description of the plugin, and if you have any questions, ask please :)


Regards,

Paulo

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.