Hi,
I notice that the Evothings connection URL is displayed at the bottom left hand corner of the Evothings Workbench. Is there a way to retrieve this URL automatically in one of my apps? For example, suppose I want to modify the Hello World app to read: "Hello World! The Evothings Connection URL is [connection URL]", where [connection URL] is the URL displayed in the bottom left hand corner of the Workbench. Right now my best solution is to manually copy the URL into index.html, but I have to do this every time the URL changes. Does anyone have a better solution?
Thanks.
Retrieve Evothings Connection URL automatically
Re: Retrieve Evothings Connection URL automatically
Code: Select all
<p>
Connection URL is [<script>document.write(window.location)</script>]
</p>
just include that within your HTML code.
if you want to get just the hostname and port, change variable window.location.hostname and windows.location.port.
// Aaron
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 30 guests