Skip to main content
6-Contributor
August 14, 2020
Question

How to get current mashup url at runtime?

  • August 14, 2020
  • 1 reply
  • 2626 views

Hi,

 

How to get the current mashup url at runtime? I tried adding location.href in an expression widget but it gives about:blank. Is there a way to get the whole thingworx url dynamically at runtime in a mashup or is there a way to get the current mashup name at runtime?

1 reply

19-Tanzanite
August 17, 2020

The following should work: location.hostname, location.port, location.host, location.protocol

 

location.href would not work  from what I remember.

MDUser6-ContributorAuthor
6-Contributor
August 18, 2020

Thanks. I am able to get the host and port. Is there a way to get the mashup name as well or to get the complete url including mashup name?