RE: URL redirect with ?variables=

40 views
Skip to first unread message

in...@lioness-lab.org

unread,
Oct 24, 2023, 9:41:00 AM10/24/23
to Paul Vanags, LIONESS Lab help and discussion

Hi Paul,

 

Is the variable totalReward defined prior to the redirect line? If it is, could you share the name of your experiment so I can have a quick look?

 

Cheers, Lucas

 

From: lione...@googlegroups.com <lione...@googlegroups.com> On Behalf Of Paul Vanags
Sent: Monday, October 23, 2023 9:43 PM
To: LIONESS Lab help and discussion <lione...@googlegroups.com>
Subject: URL redirect with ?variables=

 

Hi I am trying to get a URL redirect (to Qualtrics) at the end of my survey, but for some reason I can't get it to work.

 

This is the code line..

 

 

It doesn't redirect is stays on the Lioness server and doesn't move off the redirect page.

 

However when I populate the link with numbers (as below) rather than variables from the database the link works perfectly and automatically redirects as soon as it hits the page

 

 

I can paste the code WITH the variables into the console and it also works there no problem, but for some reason Lioness gets stuck.

 

Any ideas?

 

Thanks, Paul.

 

--
You received this message because you are subscribed to the Google Groups "LIONESS Lab help and discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lioness-lab...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/lioness-lab/e5d78de4-ae3c-4c6e-befd-c84ac339bb43n%40googlegroups.com.

Paul Vanags

unread,
Oct 24, 2023, 11:53:22 AM10/24/23
to LIONESS Lab help and discussion
Thanks Lucas - I thought I had deleted the thread as I solved it. I forgot that the variables need to be called from the database, adding in these called solved the problem ie. berries = getValue('session', 'playerNr='+playerNr, 'totalEarnings');

I had also tried using window.location.replace which compounded the problem, but all sorted now, thanks for replying, I am very close to finishing my experiment now!

Paul.



in...@lioness-lab.org

unread,
Oct 24, 2023, 11:56:17 AM10/24/23
to Paul Vanags, LIONESS Lab help and discussion

Great! Good luck collecting your data!

Reply all
Reply to author
Forward
0 new messages