Millisecond Forums

Finish page not redirecting correctly

https://forums.millisecond.com/Topic11471.aspx

By socialpsych - 10/17/2013

Hello, I'm hoping someone can tell me where I've gone wrong with the following section of Inquisit Web script!


I want to redirect participants to a specific webpage if they click Button 1, by updating the finishpage attribute. Instead, Chrome redirects to my homepage, and Firefox redirects to file:///%22http://myurl.com%22


If they click Button 2 they should be taken to the default finish page; this works as intended.


I have added some checks into the script below, and they confirm that the response is being collected and that the finishpage is being updated. It just isn't redirecting.


Thanks in advance for any advice!




<expt finishpagetest>


/ blocks = [1=test]


</expt>



<defaults>


/ finishpage = "http://www.millisecond.com/web/finish.aspx"


</defaults>



<block test>


/ trials = [1=clicklink; 2=showresponse; 3=showfinishpage]


</block>



<trial clicklink>


/ stimulustimes = [1=button1, button2]


/ inputdevice = mouse


/ showmousecursor = true


/ validresponse = (button1, button2)


</trial>



<text response>


/ items= ("response = <% trial.clicklink.response %>")


</text>



<trial showresponse>


/ stimulustimes = [1=response]


/ timeout = 2000


/ ontrialbegin = [if (trial.clicklink.response == "button1") defaults.finishpage="http://www.organdonation.nhs.uk"]


</trial>



<text whatpage>


/ items= ("finish page = <% defaults.finishpage %>")


</text>



<trial showfinishpage>


/ stimulustimes = [1=whatpage]


/ timeout = 2000


</trial>



<picture button1>


/ items = ("button1.png")


/ position = (50%, 55%)


</picture>



<picture button2>


/ items = ("button2.png")


/ position = (50%, 85%)


</picture>

By Dave - 10/17/2013

You are not doing anything wrong as far as I can see. There must be some sort of bug involved. Unfortunately I cannot think of any workaround (other than not using the NPAPI plugin), so hopefully a fix for this can still be included in the next release due in a couple of weeks. Thanks for the report!

By socialpsych - 10/17/2013

Thanks for letting me know this is a bug, Dave - I can now stop trying to find out what I'm doing wrong! If it helps, I couldn't get it to work using Java Web Start either, or using multiple start methods in Internet Explorer.



Unfortunately this is a crucial part of my study (i.e. giving participants a choice over the finish page and recording that choice), and I can't think of an alternative way of implementing it, so I'll postpone my data collection and keep an eye out for the fix.

By guirusso - 4/11/2014

Hi, 

I guess I am running into a similar problem. I am trying to forward respondents to a website only if they respond Yes to a question. The code runs fine, but it is not forwarding as I expected. Is there something wrong with my code?


Here is my code:
<expt htv>
/ blocks = [1=survey; 2=finish]
</expt>


#Block Survey
<block survey>
/ trials=  [1=donate; 2=amount; 3=petition; 4=link; 5=debrief]
</block>
.....
<radiobuttons link3>
/ fontstyle = ("Arial", 2.5%)
/ caption = "Would you like to be forwarded to this petition’s actual link in the end of the survey?"
/ options = ("Yes", "No, thank you")
/ position = (10,60)   
</radiobuttons>
.....

#Block Finish Page
<block finish>
/ skip = [radiobuttons.link3.response=="No"]
/ ontrialend = [defaults.finishpage="http://www.cnn.com";]
</block>


Thanks,
Gui
By Dave - 4/11/2014

<block finish>
/ skip = [radiobuttons.link3.response=="No"]
/ ontrialend = [defaults.finishpage="http://www.cnn.com";]
</block>

That block doesn't run any trial, thus that /ontrialend command will never be executed and defaults.finishpage will not be set.