Skip to main content
Aug 2, 2021 2:22 PM UTC
Solved

js code

Why window.location.hostname, window.location.host codes and showing errors inside Thing services??  

PaiChungAnswer
Aug 3, 2021 5:38 PM UTC

In your Things (Server side JScript) window and location do not exist.

if you are doing this in an Expression widget, client side, Window is not allowed.

3 replies

PaiChungAnswer
Aug 3, 2021 5:38 PM UTC

In your Things (Server side JScript) window and location do not exist.

if you are doing this in an Expression widget, client side, Window is not allowed.

Aug 4, 2021 9:49 AM UTC

What you mean when you telling 'client side'?

Aug 4, 2021 1:01 PM UTC

You need the code to run in a Mashup/web page on the user's machine (How you normally expect JS to be used)