Getting current URL Was (JS set URL page)

Andrew Stolarz stolarz at gmail.com
Thu Jan 9 15:40:15 UTC 2025


Hi Mike,

We do something similar and use the following javascript to redirect to a
login page for example (which closes the current remote task).

 JavaScript:window.location.href = "https://" + window.location.hostname +
"/login.htm";

It will use the same domain they are currently on.


Andrew


On Wed, Jan 8, 2025 at 9:32 AM Mike Matthews - Omnis via omnisdev-en <
omnisdev-en at lists.omnis-dev.com> wrote:

> Hello All,
>
> Following on from how to choose another URL from a JS client, how do get
> the current URL from your browser at any point?  I really only want the URL
> at the time of connection during the $construct of the first Remote Form.
>
> I was thinking of sending the user back there, ie, the beginning and close
> current Task, which would drop the Omnis connection, and then start all
> over again.  Like a reset.
>
> Thanks
>
> Mike Matthews
>
> Lineal Software Solutions
> Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple,
> Devon, EX31 1EU<x-apple-data-detectors://1/1>
>
> omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
>
> www.lineal.co.uk<http://www.lineal.co.uk/>
>
> www.sqlworks.co.uk<http://www.sqlworks.co/>
>
>
>
> On 7 Jan 2025, at 23:14, Mike Matthews - Omnis via omnisdev-en <
> omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>>
> wrote:
>
> External sender <omnisdev-en at lists.omnis-dev.com<mailto:
> omnisdev-en at lists.omnis-dev.com>>
>
> Make sure you trust this sender before taking any actions.
>
> Also, you can use this command : $showurl()
>
> Mike Matthews
>
> Lineal Software Solutions
> Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple,
> Devon, EX31 1EU<x-apple-data-detectors://1/1>
>
> omnis at lineal.co.uk<mailto:omnis at lineal.co.uk><mailto:
> mike.matthews at lineal.co.uk>
>
> www.lineal.co.uk<http://www.lineal.co.uk><http://www.lineal.co.uk/>
>
> www.sqlworks.co.uk<http://www.sqlworks.co.uk><http://www.sqlworks.co/>
>
>
>
> On 7 Jan 2025, at 20:14, Andrew Stolarz <stolarz at gmail.com<mailto:
> stolarz at gmail.com><mailto:stolarz at gmail.com>> wrote:
>
> Warning: Unusual sender <stolarz at gmail.com<mailto:stolarz at gmail.com
> ><mailto:stolarz at gmail.com>>
>
> You don't usually receive emails from this address.
> Make sure you trust this sender before taking any actions.
>
> Hi Mike,
>
> You should be able to use some javascript for this...
>
> ie.
>
> JavaScript:window.location.href = "
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.sqlworks.co.uk%2f&c=E,1,l4JfEqExweDLtwixCCHsvnd-aWagoD8dl4Wjo8ysykEe_CnpYJSGnVOW-5E22DVosN9kqlkEygFdS3_7l1hviRPBSOPTbNLJ2xt_2EgQvCaoScQFqEzo&typo=1
> ";
>
> you need to make sure you have the method "execute on client" enabled.
>
>
> Andrew
>
>
>
> On Tue, Jan 7, 2025 at 2:59 PM Mike Matthews - Omnis via omnisdev-en <
> omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com
> ><mailto:omnisdev-en at lists.omnis-dev.com>> wrote:
>
> Hello All,
>
> Very wet and blustery here in the UK, but dry and no snow in North Devon
> luckily.
>
> In a remote form, what is the syntax for changing the URL that the browser
> tab/window is currently using please?  This is so I can close the JS
> session and goto a different Url, eg,
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.sqlworks.co.uk&c=E,1,1Ngfy95tdkY-5WKfu9STP6T0jsEcQ_pFnYQzXNUHXwi5rkxaNS38kF6SYgSEGc9d6GlgUnVliAnhzkgECLISTiaOb-rjMl2_CJGKat3ZfO0GQgX-JdLCjW7RlsE,&typo=1
> <
>
> https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co.uk&c=E,1,TGU4o5higQkvjlP8ej2WkK0-utN5G8NNA7JaOdkO8jBUQwLxU6cz-MqsOi423sUDiakOZm1U8RxSf5rmaHuwkEFq7KRIyAB_4Vp7fDA3bWro2QuMaL8,&typo=1>
> as an example.
>
> Thanks
>
> Mike Matthews
>
> Lineal Software Solutions
> Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple,
> Devon, EX31 1EU<x-apple-data-detectors://1/1>
>
> omnis at lineal.co.uk<mailto:omnis at lineal.co.uk><mailto:omnis at lineal.co.uk
> ><mailto:mike.matthews at lineal.co.uk>
>
>
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.lineal.co.uk&c=E,1,g17ZTLX-10U5l5S6YWYRRYwdNe2NplkwP01K6PaCeIgqC4C8CZKKc7rWsmPFku-62fYSIaxRt-Arcdd5KP2gz65i5j9_PzkvrLzpx6ChOXZ3niz6Y31QJp1H3Q,,&typo=1
> <
> https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk%2f&c=E,1,vn9RXSlUlWWrPx09FJ-d3N-mFNzlvloOMkhIe7ztp1tjNINlZ1KdmIQ-eIoAfbSw_1XE-QaTdSpZITqst2PhFsEkgGnlepNhbNk71LFn2WazyLffgBAL&typo=1
> >
>
>
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.sqlworks.co.uk&c=E,1,whukxVLLpDSgb7Wi9yk-kPWWfxHvkJ9nnpg35W0aAMs5UXO9aX7m95GiVv2FnRYjPK-UqN_He4WtVrKze7R95Mgc9TykfNC6MhDgW-lwUdBeHSsNxzjbPPsg&typo=1
> <
> https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co%2f&c=E,1,-LiuNlw7BsEYhGl9ewJD-rk1XswI70tkiCM6evUpXlpVnPz0J-HssCFHNKYYXmSTiZPNVK6jCNn4B4R4Xxtq37y70sDQ8egcf0ioyTxhcWcv_7lqlg,,&typo=1
> >
>
>
>
> _____________________________________________________________
> Manage your list subscriptions at
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,_Jv6BXwdYkaTv1-GWfDGwyln2BQtvMmbmANmLvp2j9KULPzmM6oxiALb-DsCckaVG8688L4ahFVVzQtfs9qkuMC9pttL4rcKOu6OhOx9wg,,&typo=1
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,3irRkuWEDywKnDbSVEqb1q-0j-1K249Vzm0dTDwOJs8MsaO2TUFrumjeKaLgNRw6NtOdFcSTclCjyifmVN8XAgnF4Ptws3019zjPz6FkuXBiVstuAQ,,&typo=1
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>


More information about the omnisdev-en mailing list