July 7, 2020, 4:18pm
URL of experiment:
Description of the problem: text and image is not appearing on screen online
I am using .setImage and goXO1.setText(‘X’) and also tried goXO1.text = ‘X’
but not working
Thanks in advance…
In what way is it not working? Please show your code component and the routine so we can see the relative positions.
July 7, 2020, 10:43pm
it is not showing text and image that i am setting in the code section.
I added these inline in the begin routine
as this same code is working in offiline without giving any error.
I think it need some modification for online running as in js script.
if stimXO1[trialN] == 1:
if GNG1[trialN] == 1:
Have you tried print(trialN) etc?
Personally I’ve found that .text= works better than.setText() but I think that both should work and you say you’ve tried both .
You have some commented out print commands . They have , where U would expect +
Did the confirm that your image is correct?
Are you getting any error messages?
Is there anything else that might be hiding the images?
July 9, 2020, 1:25am
Hello Thanks for reply
i tried both but letter not appearing.
print i tried in offline, where it worked…
is this possible to see online, please let me know.
There is no error message, program is running smoothly.
July 9, 2020, 1:30pm
It seems code written in Begin Routine is not visible in js code online.
July 9, 2020, 1:32pm
Thanks a lot
@wakecarter for this information.
July 9, 2020, 1:47pm
sorry to say but i am unable to see code of begin routine section in .js online file and also in web IDE.
Thanks for your support.
Have you made your experiment in Builder?
If so, please could you show screen shots of your code components?
July 9, 2020, 7:49pm
Now some issue resolved as i saved images as image.jpg and in online html.resources saved as image.jpg.jpg.
now i am using this code stop1.setImage(None) which was working offline but now it seems problem here.
in some trials i am setting an image but on some trials i don’t need image.
any suggestion regarding this would be helpful.
To hide an image use stop1.setAutoDraw(False)
Check the syntax in my crib sheet