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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

ReferenceError: "window" is not defined.

rmasoud1
1-Newbie

ReferenceError: "window" is not defined.

Hi,

I am not fairly familar with javascript, but found that I could use the following code to get the current URL of the open webpage.

var url = window.location.href;

I am getting an error, "window" is not defined, which I do not understand why.

Is it part of a library not in Thingworx and if so, how can I import that library into Thingworx?

Thank you,

Rami

1 ACCEPTED SOLUTION

Accepted Solutions
posipova
20-Turquoise
(To:rmasoud1)

THe function is not part of the rhino javascript engine. You may look into developing a custom java extension that would utilize a similar function and then importing it into your ThingWorx instance.

View solution in original post

1 REPLY 1
posipova
20-Turquoise
(To:rmasoud1)

THe function is not part of the rhino javascript engine. You may look into developing a custom java extension that would utilize a similar function and then importing it into your ThingWorx instance.

Top Tags