Can i store Javascript variable with oSession ?

Topics: User Forum
May 14, 2014 at 10:40 AM
Hi friends,
i need to store the return value of Javascript function for catching in another webpage. Can i use the oSession method for it?

If can be useful... i've a Javascript confirm message that return me true or false. This value is important for destination link. I've tryed to use "window.location" in the Javascript function but the action form load, always, the page linked in the form. If i remove this, the page reload itself...

Can you help me? :)
May 19, 2014 at 11:49 AM
I think it's not possible. However, i used a invisible "Input text" for storing my value and i get it with oRequest.form methods. It's not elegant but works fine :)

Now i'm another problem but i open another topic because isn't relevant with this argument.
Dec 22, 2014 at 11:22 AM
Ok, i have this problem again but this time i can't resolve with a hidden form "Input text". I need to change the font size of button in my page according to defined parameters that i calculate with the device resolution that loads the page.

I get the screen width with Javascript because i can't get it with VFP code (_SCREEN.width give a wrong value). My problem is that I can not take this calculated value from the Javascript code. How can i get this value and store it in a VFP variable?

However, i'm avaliable to alternative solutions...
Dec 22, 2014 at 1:26 PM
Post it to VFP on the server side using AJAX and store in oSession
Dec 22, 2014 at 4:58 PM
I don't know how can i do this. However, i don't want to load every page two times. Now i'm in search a way to set a different css based on resolution. I'll let you know what i find...