﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 6  » How to save current item in image element to datafile?</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sat, 12 Sep 2026 13:15:43 GMT</lastBuildDate><ttl>20</ttl><item><title>How to save current item in image element to datafile?</title><link>https://forums.millisecond.com/Topic32399.aspx</link><description>Sorry, this has probably been asked before but searching the forums is very slow and tedious (the name 'instantForum' being some sort of joke) and I cannot find what I am looking for.&lt;br/&gt;&lt;br/&gt;At the end of my experiment I want to test participant's knowledge by showing each stimulus and asking them a radiobutton question. Based on advice in the forums I am therefore using the image element and (radiobutton element) and putting them both in a surveypage. This is the essential code.&lt;br/&gt;&lt;br/&gt;&amp;lt;item monsterImages&amp;gt;&lt;br/&gt;/ 1 ="M1.GIF"&lt;br/&gt;/ 2 ="M2.GIF"&lt;br/&gt;/ 3 ="M3.GIF"&lt;br/&gt;/ 4 ="M4.GIF"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;image instrumKnowledge&amp;gt;&lt;br/&gt;/items = monsterImages&lt;br/&gt;&amp;lt;/image&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons instrumKnowledgeQ&amp;gt;&lt;br/&gt;/ caption = "If you saw this monster appear, what was the correct response to make and what would you earn?"&lt;br/&gt;/ options = ("Click to earn chocolate", "Click to earn ice cream", "do not click to earn chocolate", "do not click to earn ice cream")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage instrumKnowledge&amp;gt;&lt;br/&gt;/ questions = [1=instrumKnowledge; 2 = radiobuttons.instrumKnowledgeQ]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block knowledgeTests&amp;gt;&lt;br/&gt;/ preinstructions = (page.finalKnowledgeCheck)&lt;br/&gt;/ onblockbegin = [values.blockCount +=1; values.trialcount = 0;]&lt;br/&gt;/trials = [1-4 = surveypage.instrumKnowledge;]&lt;br/&gt;/ postinstructions = (page.thankyou)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;Despite the fact that there is no 'select' option available under the image element, the script runs through the four monsterImages stimuli when I run the block. However, no information about which of the four stimuli is currently being shown is recorded anywhere in the datafile (e.g., the stimulusitem field just populates with 'monsterImages'). I assumed that I could use something like currrentPic = item.monsterImages.currentitem feature with onblockend but this is apparently not possible with the surveypage element? Advice appreciated. Thank you&lt;br/&gt;</description><pubDate>Fri, 29 Oct 2021 00:29:44 GMT</pubDate><dc:creator>pops</dc:creator></item><item><title>RE: How to save current item in image element to datafile?</title><link>https://forums.millisecond.com/Topic32403.aspx</link><description>&lt;blockquote data-id="32402" class="if-quote-wrapper" unselectable="on" data-guid="1635467367460" id="if_insertedNode_1635467365944" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="32402" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="32402" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="32402" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 10/29/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-32402"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="32399" class="if-quote-wrapper" unselectable="on" data-guid="1635467367460" id="if_insertedNode_1635465723462" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="32399" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="32399" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="32399" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 10/28/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-32399"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Sorry, this has probably been asked before but searching the forums is very slow and tedious (the name 'instantForum' being some sort of joke) and I cannot find what I am looking for.&lt;br/&gt;&lt;br/&gt;At the end of my experiment I want to test participant's knowledge by showing each stimulus and asking them a radiobutton question. Based on advice in the forums I am therefore using the image element and (radiobutton element) and putting them both in a surveypage. This is the essential code.&lt;br/&gt;&lt;br/&gt;&amp;lt;item monsterImages&amp;gt;&lt;br/&gt;/ 1 ="M1.GIF"&lt;br/&gt;/ 2 ="M2.GIF"&lt;br/&gt;/ 3 ="M3.GIF"&lt;br/&gt;/ 4 ="M4.GIF"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;image instrumKnowledge&amp;gt;&lt;br/&gt;/items = monsterImages&lt;br/&gt;&amp;lt;/image&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons instrumKnowledgeQ&amp;gt;&lt;br/&gt;/ caption = "If you saw this monster appear, what was the correct response to make and what would you earn?"&lt;br/&gt;/ options = ("Click to earn chocolate", "Click to earn ice cream", "do not click to earn chocolate", "do not click to earn ice cream")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage instrumKnowledge&amp;gt;&lt;br/&gt;/ questions = [1=instrumKnowledge; 2 = radiobuttons.instrumKnowledgeQ]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block knowledgeTests&amp;gt;&lt;br/&gt;/ preinstructions = (page.finalKnowledgeCheck)&lt;br/&gt;/ onblockbegin = [values.blockCount +=1; values.trialcount = 0;]&lt;br/&gt;/trials = [1-4 = surveypage.instrumKnowledge;]&lt;br/&gt;/ postinstructions = (page.thankyou)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;Despite the fact that there is no 'select' option available under the image element, the script runs through the four monsterImages stimuli when I run the block. However, no information about which of the four stimuli is currently being shown is recorded anywhere in the datafile (e.g., the stimulusitem field just populates with 'monsterImages'). I assumed that I could use something like currrentPic = item.monsterImages.currentitem feature with onblockend but this is apparently not possible with the surveypage element? Advice appreciated. Thank you&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="32399"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Yes, this is a limitation of the &amp;lt;image&amp;gt; element and requires a little trickery:&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;item monsterImages&amp;gt;&lt;br/&gt;/ 1 ="M1.GIF"&lt;br/&gt;/ 2 ="M2.GIF"&lt;br/&gt;/ 3 ="M3.GIF"&lt;br/&gt;/ 4 ="M4.GIF"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture monsterpic&amp;gt;&lt;br/&gt;/ items = monsterImages&lt;br/&gt;/ position = (-1%,-1%)&lt;br/&gt;/ size = (0.5px, 0.5px)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;image instrumKnowledge&amp;gt;&lt;br/&gt;/items = ("&amp;lt;%picture.monsterpic.currentitem%&amp;gt;")&lt;br/&gt;&amp;lt;/image&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons instrumKnowledgeQ&amp;gt;&lt;br/&gt;/ caption = "If you saw this monster appear, what was the correct response to make and what would you earn?"&lt;br/&gt;/ options = ("Click to earn chocolate", "Click to earn ice cream", "do not click to earn chocolate", "do not click to earn ice cream")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage instrumKnowledge&amp;gt;&lt;br/&gt;/ stimulusframes = [1=monsterpic]&lt;br/&gt;/ questions = [1=instrumKnowledge; 2 = radiobuttons.instrumKnowledgeQ]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block knowledgeTests&amp;gt;&lt;br/&gt;/ preinstructions = (page.finalKnowledgeCheck)&lt;br/&gt;/ onblockbegin = [values.blockCount +=1; values.trialcount = 0;]&lt;br/&gt;/trials = [1-4 = surveypage.instrumKnowledge;]&lt;br/&gt;/ postinstructions = (page.thankyou)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;[/code]&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="32402"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Thanks Dave! I would have been struggling to figure that out on my own :</description><pubDate>Fri, 29 Oct 2021 00:29:44 GMT</pubDate><dc:creator>pops</dc:creator></item><item><title>RE: How to save current item in image element to datafile?</title><link>https://forums.millisecond.com/Topic32402.aspx</link><description>&lt;blockquote data-id="32399" class="if-quote-wrapper" unselectable="on" data-guid="1635465723803" id="if_insertedNode_1635465723462" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="32399" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="32399" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="32399" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 10/28/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-32399"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Sorry, this has probably been asked before but searching the forums is very slow and tedious (the name 'instantForum' being some sort of joke) and I cannot find what I am looking for.&lt;br/&gt;&lt;br/&gt;At the end of my experiment I want to test participant's knowledge by showing each stimulus and asking them a radiobutton question. Based on advice in the forums I am therefore using the image element and (radiobutton element) and putting them both in a surveypage. This is the essential code.&lt;br/&gt;&lt;br/&gt;&amp;lt;item monsterImages&amp;gt;&lt;br/&gt;/ 1 ="M1.GIF"&lt;br/&gt;/ 2 ="M2.GIF"&lt;br/&gt;/ 3 ="M3.GIF"&lt;br/&gt;/ 4 ="M4.GIF"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;image instrumKnowledge&amp;gt;&lt;br/&gt;/items = monsterImages&lt;br/&gt;&amp;lt;/image&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons instrumKnowledgeQ&amp;gt;&lt;br/&gt;/ caption = "If you saw this monster appear, what was the correct response to make and what would you earn?"&lt;br/&gt;/ options = ("Click to earn chocolate", "Click to earn ice cream", "do not click to earn chocolate", "do not click to earn ice cream")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage instrumKnowledge&amp;gt;&lt;br/&gt;/ questions = [1=instrumKnowledge; 2 = radiobuttons.instrumKnowledgeQ]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block knowledgeTests&amp;gt;&lt;br/&gt;/ preinstructions = (page.finalKnowledgeCheck)&lt;br/&gt;/ onblockbegin = [values.blockCount +=1; values.trialcount = 0;]&lt;br/&gt;/trials = [1-4 = surveypage.instrumKnowledge;]&lt;br/&gt;/ postinstructions = (page.thankyou)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;Despite the fact that there is no 'select' option available under the image element, the script runs through the four monsterImages stimuli when I run the block. However, no information about which of the four stimuli is currently being shown is recorded anywhere in the datafile (e.g., the stimulusitem field just populates with 'monsterImages'). I assumed that I could use something like currrentPic = item.monsterImages.currentitem feature with onblockend but this is apparently not possible with the surveypage element? Advice appreciated. Thank you&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="32399"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Yes, this is a limitation of the &amp;lt;image&amp;gt; element and requires a little trickery:&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;item monsterImages&amp;gt;&lt;br/&gt;/ 1 ="M1.GIF"&lt;br/&gt;/ 2 ="M2.GIF"&lt;br/&gt;/ 3 ="M3.GIF"&lt;br/&gt;/ 4 ="M4.GIF"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture monsterpic&amp;gt;&lt;br/&gt;/ items = monsterImages&lt;br/&gt;/ position = (-1%,-1%)&lt;br/&gt;/ size = (0.5px, 0.5px)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;image instrumKnowledge&amp;gt;&lt;br/&gt;/items = ("&amp;lt;%picture.monsterpic.currentitem%&amp;gt;")&lt;br/&gt;&amp;lt;/image&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons instrumKnowledgeQ&amp;gt;&lt;br/&gt;/ caption = "If you saw this monster appear, what was the correct response to make and what would you earn?"&lt;br/&gt;/ options = ("Click to earn chocolate", "Click to earn ice cream", "do not click to earn chocolate", "do not click to earn ice cream")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage instrumKnowledge&amp;gt;&lt;br/&gt;/ stimulusframes = [1=monsterpic]&lt;br/&gt;/ questions = [1=instrumKnowledge; 2 = radiobuttons.instrumKnowledgeQ]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block knowledgeTests&amp;gt;&lt;br/&gt;/ preinstructions = (page.finalKnowledgeCheck)&lt;br/&gt;/ onblockbegin = [values.blockCount +=1; values.trialcount = 0;]&lt;br/&gt;/trials = [1-4 = surveypage.instrumKnowledge;]&lt;br/&gt;/ postinstructions = (page.thankyou)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;[/code]&lt;br/&gt;&lt;br/&gt;</description><pubDate>Fri, 29 Oct 2021 00:13:37 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>