Displaying text that varies with the clicked radiobutton (in real time)


Author
Message
EN
EN
Associate Member (148 reputation)Associate Member (148 reputation)Associate Member (148 reputation)Associate Member (148 reputation)Associate Member (148 reputation)Associate Member (148 reputation)Associate Member (148 reputation)Associate Member (148 reputation)Associate Member (148 reputation)
Group: Forum Members
Posts: 30, Visits: 177
Hello:

I wonder if it is possible to display some text that varies depending on the clicked radiobutton, on the same screen with the radiobuttons?
The text should be changed in real time, that is, if the subject clicks another radiobutton, the text should change accordingly.

The sample code below is where I'm standing right now. I am able to detect the radiobutton that was clicked _before_ the user pressed "continue" and display the corresponding text on the next screen. I would like to merge those two screens.

Any help will be greatly appreciated. Thank you very much in advance!
EN
--
<survey SOV_explain_survey>
/pages = [1=SOV_explain]
</survey>

<surveypage SOV_explain>
/caption = "EXPLANATION ABOUT buttons of radiobuttons"
/questions = [1-1=sequence(SOV_item1)]
/ itemfontstyle = ("Arial", 2.00%, false, false, false, false, 5, 1)
/ itemspacing = 0.0%
/ showpagenumbers = false
/ showbackbutton = false
/ showquestionnumbers = false
/ responsefontstyle = ("Arial", 2.0%, false, false, false, false, 5, 1)
</surveypage>

<radiobuttons SOV_item1>
/ caption="<b>SOV item 1 </b>"
/ options=("<b>自分</b>:85<br><b>相手</b>:85", ":85<br>:76", ":85<br>:68", ":85<br>:59", ":85<br>:50", ":85<br>:41", ":85<br>:33", ":85<br>:24", ":85<br>:15")
/ optionvalues = ("1", "2", "3", "4","5", "6", "7", "8", "9")
/ required = true
/ orientation = horizontalequal
/ defaultResponse = 5
</radiobuttons>

<text myText1>
// items= ("You chose = <% radiobuttons.SOV_item1.selectedValue %>")
/ items = test_SOV_choice1
/ select = radiobuttons.SOV_item1.selectedValue
</text>

<trial showText1>
/stimulusFrames = [1=myText1]
///stimulusFrames = [1=SOV_explain; 2=myText1]
/timeout = 5000
</trial>

<block wrap_showText1>
/trials=[1=showText1]    
</block>

///

<item test_SOV_choice1>
/ 1="自分の取り分は85、相手の取り分は85 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 2="自分の取り分は85、相手の取り分は76 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 3="自分の取り分は85、相手の取り分は68 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 4="自分の取り分は85、相手の取り分は59 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 5="自分の取り分は85、相手の取り分は50 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 6="自分の取り分は85、相手の取り分は41 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 7="自分の取り分は85、相手の取り分は33 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 8="自分の取り分は85、相手の取り分は24 --> <% radiobuttons.SOV_item1.selectedValue %>"
/ 9="自分の取り分は85、相手の取り分は15 --> <% radiobuttons.SOV_item1.selectedValue %>"
</item>

///
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
EN - Last Week
Dave - 5 days ago @ 3:26 AM
EN - 5 days ago @ 9:57 PM
Dave - 4 days ago @ 2:49 AM
                     Thanks for confirming, Dave! EN
EN - 4 days ago @ 3:05 PM

Reading This Topic

Explore
Messages
Mentions
Search