# ReferenceError: $text is not defined

**URL:** https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439
**Category:** Online experiments
**Tags:** pavlovia
**Created:** [January 10, 2025, 9:53am UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439 "2025-01-10T09:53:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Maitland](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/david_maitland/32/40280_2.png) [@David\_Maitland](https://discourse.psychopy.org/u/David_Maitland)
#### Post date: [January 10, 2025, 9:53am UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439/1 "2025-01-10T09:53:14Z")

</div>

URL of experiment: [Maitland/morphological\_task](https://pavlovia.org/Maitland/morphological_task)

Description of the problem:

I am creating a task, in which participants are presented with a sentence and they are to click the correct characters that go with it. For example, there will be one sentence above, and two characters below, the participant needs to click one of the two characters that go with the sentence.

The script works perfectly offline via PsychoPy, however, when running it via Pavlovia I get the error \* **ReferenceError: $target\_corr is not defined** when I click on one of the characters. As far as I am aware I have defined the target\_corr as it works offline. (One character is labelled ‘target\_corr’ and the other is labelled ‘target\_incorr.’).

Forgive my Mandarin, as I just typed in random characters to try and get the script working.

Thank you!

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [January 10, 2025, 10:53am UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439/2 "2025-01-10T10:53:40Z")

</div>

Try removing the $. In general if there is a grey $ to the left of a parameter field you should not use one within the field.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/9/5/95019482fe6ea0304bea8707624f3b8dc1ffbf1e.png)

---

<div class="post-metadata">

### Author: ![David\_Maitland](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/david_maitland/32/40280_2.png) [@David\_Maitland](https://discourse.psychopy.org/u/David_Maitland)
#### Post date: [January 10, 2025, 11:06am UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439/3 "2025-01-10T11:06:55Z")

</div>

Hi,

Thank you for replying.

I tried this previously but I am still getting the same error, however, I have took off the $ sign and have reuploaded. Still getting $text is not defined.

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [January 10, 2025, 11:09am UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439/4 "2025-01-10T11:09:19Z")

</div>

Have you tried an incognito tab?

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371):
>
> Run the latest version of your experiment When you synchronise changes to your experiment, you may need to clear your browser cache to see those changes online (using Ctrl-Shift-R, Ctrl-F5, or equivalent). If this does not work (for example because a spreadsheet has changed rather than the JavaScript files or you are using a mobile device) use an incognito (private) browser tab. A participant will not need to do this, so long as they have not already tried a previous version of your experiment. …

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [January 10, 2025, 11:17am UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439/5 "2025-01-10T11:17:42Z")

</div>

Also, I notice your version is 2024.2.1post4

I would recommend that you upgrade to 2024.2.4

---

<div class="post-metadata">

### Author: ![David\_Maitland](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/david_maitland/32/40280_2.png) [@David\_Maitland](https://discourse.psychopy.org/u/David_Maitland)
#### Post date: [January 10, 2025, 11:40am UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439/6 "2025-01-10T11:40:24Z")

</div>

I have tried running an Incognito tab, I now get just a blank screen. I have no folder labelled ‘index.html’ as the issue with previous forums.

And I shall update to the new version as soon as possible.

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [January 10, 2025, 12:02pm UTC](https://discourse.psychopy.org/t/referenceerror-text-is-not-defined/43439/7 "2025-01-10T12:02:52Z")

</div>

If you get a blank screen in an incognito tab, there might be an error message in the developer tools.

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/5):
>
> Developer Tools If you encounter an error in an online study, open the Developer tools console using Ctl-Shift-I in Windows/Chrome, Cmd-Opt-J or Cmd-Opt-I in Mac/Chrome, F12 in IE/Edge, Ctrl-Shift-J in Windows/Safari or Ctrl-Opt-J in Mac/Safari. Select the Console tab at the top and errors item on the left to view errors. Ignore the 404 error related to favicon.ico Look for the error that appears on the main screen and click on the link next to Scheduler.\_currentTask. Take…
