Redirecting to different external URLs based on groupid value


Author
Message
egcunningham
egcunningham
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 2, Visits: 8
Hi there,

I am looking for some help with an issue I am encountering after trying to follow the instructions from an older version forum post (https://forums.millisecond.com/RssFeed2.aspx?TopicID=19623). I have followed exactly the steps provided in one of the responses there and have the following code:
https://mili2nd.co/MYTASK?ParticipantID=test&Group=85
https://mili2nd.co/MYTASK?ParticipantID=test&Group=86
https://mili2nd.co/MYTASK?ParticipantID=test&Group=87
https://mili2nd.co/MYTASK?ParticipantID=test&Group=88

<expt>
/ onexptbegin = [
  if (script.groupid == 85) {defaults.finishpage = "http://www.example.com";}
  else if (script.groupid == 86) {defaults.finishpage = "http://www.google.com";}
  else if (script.groupid == 87) {defaults.finishpage = "http://www.yahoo.com";}
  else if (script.groupid == 88) {defaults.finishpage = "http://www.bing.com";}
]
/ blocks = [1=myblock]
</expt>

<block myblock>
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("Your group id is <%script.groupid%>.~nYou'll be redirected to <%defaults.finishpage%>.")
/ size = (75%, 50%)
</text>


This code results in the proper information being displayed on the screen (see screenshot below), however, when the spacebar is pressed, the original default finish page is displayed rather than the URL set to defaults.finishpage and shown on the screen. I cannot figure out how to get the URL to actually be opened in a browser window to redirect the participant from Inquisit. Any help would be greatly appreciated! I am new to using this software!

 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search