[RDMLX]Offline External Invocation Handler

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

[RDMLX]Offline External Invocation Handler

Post by MegumiSawada »

Hi,

I have a requirement to invoke longrange offline form from URL.
I can fire up javascript via the target form's onload event to open offline form. However how can I get the inbound parameters from the URL?

I have found the following topic and it seems we were not able to pass a parameter to offline form at that time(on 2014).
http://longrange.lansa.com.au/viewtopic ... =260&p=661

Is it still not possible?

Best Regards,
Megumi Sawada
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: [RDMLX]Offline External Invocation Handler

Post by tsupartono »

Megumi,

You can read the URL parameters from your offline form.

Here is how you pass parameters in the URL:

Code: Select all

longrange://performaction/?param,1=testvalue1&param,2=testvalue2
The above example pass 2 parameters (testvalue1 and testvalue2)

In your JavaScript code (the offline form's OnLoad handler), you read the parameters by invoking receiveVars:

Code: Select all

lrexec(
    function()
    {
        this.q_receiveVars("args");
    },
    function()
    {
        this.console(this.args[0]); // first argument = testvalue1
        this.console(this.args[1]); // second argument = testvalue2
    }
);
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

Re: [RDMLX]Offline External Invocation Handler

Post by MegumiSawada »

Hi Tony,

I have been able to achieve what I would like to do based on you advice.
Thank you!!

Best Regards,
Megumi
Post Reply