Skip to main content
17-Peridot
Solved

js code

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

PaiChungAnswer
22-Sapphire I

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

PaiChung22-Sapphire IAnswer
22-Sapphire I

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.

Translate
17-Peridot

What you mean when you telling 'client side'?

Translate
22-Sapphire I

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

Translate