cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

js code

AP_9587236
17-Peridot

js code

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

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:AP_9587236)

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.

View solution in original post

3 REPLIES 3
PaiChung
22-Sapphire I
(To:AP_9587236)

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.

What you mean when you telling 'client side'?

PaiChung
22-Sapphire I
(To:AP_9587236)

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

Top Tags