Logic Machine Forum
Change external link URLs by script - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Change external link URLs by script (/showthread.php?tid=2229)



Change external link URLs by script - Carlos Padilla - 07.09.2019

Good companions, I hope you are excellent. This is to ask them, if there is a way, either by lua or javascript or otherwise, to dynamically change the url of the external link. The previous comment because, I have several users who have certain permissions to see some pages, in addition to the above I have several logic machines, which I must be able to navigate between them without asking the user and password at any time, but I must have disabled the option to disable the password for viewing, because as I said I have several users associated with a page that only they can see. So I do not know if I have to change the url dynamically depending on the user who enters or rather I must somehow skip the restriction of requesting the username and password to certain users at the time of making the external link or that to certain pages do not ask for the username and password option. I am attentive to your comments and suggestions.


RE: Change external link URLs by script - admin - 09.09.2019

You can override link like this. It will work for any other elements as well as it removes default click handler and replaces it with a custom one.
Code:
$('.link1').off('vclick').on('vclick', function() {
  window.location = 'http://openrb.com';
});