oTree Forum >

Displaying result of randomization before proceeding

#1 by Evan_Calford


I am currently running a randomization procedure in the "before_next_page" method. I would like to display the result of randomization in a pop-up before the subject goes to the next page. Is this possible? If so, how?

A somewhat clunk alternative would be to insert an entirely new page whose only purpose is to display the result of the randomization, but I hope there is a more elegant solution. 


#2 by Chris_oTree

Personally I think the simplest solution is as you said, to put it on a separate page. It seems like a pretty good solution to me, do you have a specific concern about it?

You could also use a live_method, but that will take some more custom JavaScript code.

#3 by Evan_Calford

Yeah, sounds like putting it on a separate page would be easiest. I don't have any substantive concerns with it, but aesthetically it seems like it would be nicer to avoid another page load. 

Using a live_method sounds like it would work as well, but it's probably not worthwhile figuring out how they work just to do this one little thing.



Write a reply

Set forum username