Hi guys
As Lianja.activepage does not exist in js/web, what would be the best alternative to Lianja.activepage.id ?
Sure there must be a way to know which page is active in js or should we just use a global memvar?
Thanks in advance
SpringBox
Hi guys
As Lianja.activepage does not exist in js/web, what would be the best alternative to Lianja.activepage.id ?
Sure there must be a way to know which page is active in js or should we just use a global memvar?
Thanks in advance
SpringBox
Last edited by SpringBox; 2021-08-13 at 01:02.
Hi Simon,
I have added that into the Lianja Web Framework in Lianja 6.3.
In the meanwhile as a workaround in your javascript library:
function getActivePage()
{
var page = Lianja.get(Lianja.App.currentpageid);
return page;
};
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
Thanks Barry
Don't know what we've missed but can't get that to work
Cheers
Simon
Try it interactively in the web browser javascript console.
If you can’t get it to work replace Lianja.get() with Lianja.App.getPage() or wait until 6.3 is released.
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
Not exactly sure what you meant in last reply so tried them all.
Tried Lianja.App.getPage(); interactively in the browser but
LianjaHtmlClient.js?_v=6.2.1.909-1628931458913:4433 Uncaught TypeError: Cannot read property 'replace' of undefined
at window.Lianja.Application.getPage (LianjaHtmlClient.js?_v=6.2.1.909-1628931458913:4433)
at <anonymous>:1:12
Also tried every version of the syntax we can think of in the js command window but it doesn't recognise the App part. We have tried :
var page = Lianja.App.getPage();
var page = Lianja.get("Lianja.App.getPage");
var page = Lianja.get("Lianja.App").getPage();
var page = Lianja.get("Lianja.App.getPage()");
and even (which have to be wrong)
var page = Lianja.App.getPage("Lianja.App.currentpageid");
var page = Lianja.App.getPage("currentpageid");
but all return false
Any thoughts?
var page = Lianja.App.getPage( Lianja.App.currentpageid );
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
When testing interactively in js command window
var page = Lianja.App.getPage( Lianja.App.currentpageid );
returns
Sun Aug 15 14:13:04 2021
**** Lianja JavaScript error ****
Traceback (most recent call last):
TypeError: Result of expression 'Lianja.App' [undefined] is not an object.
and when testing in the VFP command window, returns
Sun Aug 15 14:21:21 2021
**** Lianja error ****
var page = Lianja.App.getPage( Lianja.App.currentpageid )
^
Property/Variable 'APP' not found
and returns undefined when testing interactively in browser.
Lianja does not recognise the App object for some reason.
Not to worry, we have made a memvar based work around for now and it can wait until 6.3
Cheers
Simon
Yes. It’s an undocumented workaround in the web browser. Not a desktop workaround.
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