How the best way to share and change a memory variable using javascript and use on RSP?
How the best way to share and change a memory variable using javascript and use on RSP?
Hi Jefferson,
Can you explain in more detail.
Are you wanting to update a LianjaScript memory variable in am RSP from javascript running in the browser client?
You can't. Its client/server.
You need to pass parameters in with the URL and access them from your rsp using getParameter()
Last edited by barrymavin; 2022-05-10 at 08:34.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Hi Barry,
I'm trying to work around the problem in the section calendar with VT OleDb. so the idea is to get the information using Lianja.evaluate() with the delegate refresh and send it to the server.
I need show this working today.
I made a test, but work only the first time.
///// JavaScript Delegate
function page1_section1_refresh()
{
var cid = Lianja.get("page1.section1.field1");
var result = Lianja.evaluate("session_var('" + cid.text + "')");
var result1 = Lianja.evaluate("get_session_var()");
Lianja.showMessage("cid-r:"+result+"\nsession-r:"+result1);
};
//// session_var.prg
parameters m_var
if isSet(_SESSION)
_SESSION.var = m_var
v_ret = _SESSION.var
else
v_ret = m_var
endif
list memo to file c:\temp\session_var_memo
return v_ret
/// exports.conf
session_var
You cannot guarantee the state of the server in a web app. What you are doing is not going to work on a heavily loaded system.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Bookmarks