102
Views
3
Comments
Change URL Dynamically
Question

Hi!  

Depending what environment, I am using how can I change url dynamically using javascript? For example: If I am in development environment, the url should be window.open("https://tool.osys-dev.aws and If I am in internal environment, the url should be window.open("https://tool.osys-int.aws.


Thank you

2022-01-13 11-06-04
Neha Sheikh
Champion

Hi Edward,

Please check the solution of this post. This should solve your issue.


Thanks,

Neha


2025-04-17 05-42-16
Ajit Kurane

Hi,

In addition you can use below approach as well.

https://www.outsystems.com/forums/discussion/78611/how-to-implement-dynamic-url/

Thanks.

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

If you want to get the current environment hostname just add this JS code and you will get the current domain, you can further add the page address, also add https beforeit

Use window.location.hostname in you javascript code,

I hope the helps
Bet Regards
Tousif Khan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.