Page 1 of 1
Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 7:50 am
by Tracker
Hi,
I want to use a Variable javascript from one screen to another. Can you help me please ?
Re: Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 9:19 am
by lyarbrough
Hi Mamoud,
Could you give us more information about what you'd like to accomplish? What will you be using the variable for? The more information we have about this, the better we can help with a solution.
Thanks!
--Lillie
Re: Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 10:17 am
by Tracker
I want to move from one skin to an other. I use the javascript
to change first skin myskin. but I want to return to skin myskin using a variable javascript and the variable
is undefined in the second screen
Re: Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 11:13 am
by Emily
Just for some clarification on what you're wanting to accomplish here, are you saying that you want to change Genie skins between screens? For example, screen #1 would use skin 'myskin1' and then screen #2 would use skin 'myskin2'? Or is there something else you're wanting to do? We want to make sure we understand exactly what you're wanting so that we can help with finding a solution.
Thanks!
--Emily
Re: Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 11:19 am
by Tracker
yes !For example, screen #1 would use skin 'myskin1' and then screen #2 would use skin 'myskin2'.
Re: Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 12:34 pm
by Scott Klement
Changing skins is very expensive in terms of performance. It involves wiping out everything in the current browser session, and re-downloading it from the server. I would never do that on a per-screen basis, unless this is a very unusual screen that will only be used very rarely.
Likewise. the "normal" way of saving a variable across screens will not work because you are wiping out everything in the session. So you will need to use something like the browser's localStorage to save your variable, and you will need to restore it when you resume.
Please explain why you want to switch skins on a per-screen basis, so that we can consider if there's a better way to do it.
Re: Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 12:57 pm
by Tracker
I have a program
menu.rpgle (skin)
FM application
ROI option 1 (skin1)
TOI option 2 (skin)
Choice:
assume that i select option 1 and i do my work and i return to menu.rpgle is still like this
http://myi//profoundui/genie?skin=skin1 . and i would like this url
http://myi//profoundui/genie?skin=skin.
Option 1 and 2 are two differents applications and I want to call them in menu.rpgle
Re: Variable javascript from one screen to another
Posted: Thu Jan 04, 2018 6:17 pm
by Scott Klement
You can run as many applications in a single skin as you like. There is no need to switch skins to change applications.
Re: Variable javascript from one screen to another
Posted: Fri Jan 05, 2018 5:17 am
by Tracker
Of course, except that in our case there are a dozen options and the ROI option is very special. These are screens where all the elements are textbox. So you have to do it separately.