JavaScript Functions are disabled - Script not functioning properly

408
4
Jump to solution
01-23-2024 11:25 AM
DianaTorres10
New Contributor II

Hi y'all!

I'm working with a script on my survey:

DianaTorres10_0-1706037711899.png

The pulldata and the script are working properly before the survey is published.

Once the survey is online the script doesn't work. Checking the developer options on my browser I found this message:

DianaTorres10_1-1706037817287.jpeg

 

It basically says that JavaScript Functions are disabled. 

Do you know how to fix this? 

I couldn't find an option to enable them.

Thanks!

 

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

Are you logged in?  Cannot use JS if anonymous user.  Also cannot use JS across AGOL organizations.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/pulldatajavascript.htm 

View solution in original post

4 Replies
DougBrowning
MVP Esteemed Contributor

Are you logged in?  Cannot use JS if anonymous user.  Also cannot use JS across AGOL organizations.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/pulldatajavascript.htm 

DianaTorres10
New Contributor II

Thank you, I have this survey open for everyone so there's the problem. 

I'm trying to make users only write in upper case and the script was an easy solution.

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

You can use regex for upper.  Check out the bible  https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm 

abureaux
MVP Regular Contributor

Was just about to say that. Will also toss in the key phrase "cannot use JavaScript in public surveys"

To quote JamesTedrik here:


Status changed to: Closed

As mentioned in previous comments, the security team raised concerns with implementing this feature as it can potentially lead to untrusted JavaScript running on a user's device or browser (this was the reason for the original design limitation of requiring a user to be in the same organization as the form's author that currently exists).