Millisecond Forums

Could not locate element

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

By JK - 9/10/2014

I am trying to program a BART task, but I have a few error messages that I can't seem to solve. The elements that can't be located are defined in the script, and the showpumpcount expression worked fine until now and I haven't changed it. Could anyone shed some light on what is going wrong here? Thanks in advance!!!

<block BART>

 /trials: Could not locate element'instructions'.

<block questions>

 /trials: Could not locate element 'question3'.

<block summary>

 /trials: Could not locate element'instructions'.

<defaults>

<expt BART>

 Expression 'values.showpumpcount' is invalid.Expression contains an unknown element or property name.

<instruct>

<likert question1>

 /stimulusframes: Could not locate element'question1'.

<likert question2>

 /anchors: A quote, number, or label is missing.

 /stimulusframes: Could not locate element'question2'.

By Dave - 9/10/2014

<likert question2>
/ anchors = [1="zeer klein"; 5="gemiddeld''; 9="zeer lang"]
/ stimulusframes = [1 = question2]
/ numpoints=9
/ position = (50, 55)
/ anchorwidth = 10%
/ fontstyle = ("Arial", 14pt, false, false, false, false, 5)
</likert>

The characters highlighted in the above /anchors attribute are two single-quote characters, i.e. ' ' . It needs to be a single double-quote character, i.e. " .

Since double-quotes are used extensively by the parser to determine where certain things start and end, the script will not parse due to this mistake. Fix it and it'll work.


Also, this will not work:
<trial question3>
/ stimulusframes = [1=question3]
/ validresponse = (anyresponse)
</trial>

<textbox question3>
/ caption = "Waar denk je dat deze studie over ging?"
/ multiline = true
/ required = true
/ validresponse = (anyresponse)
/ position = (15%, 20%)
/ textboxsize = (80,50)
</textbox>

A <textbox> is *not* a stimulus and thus cannot be displayed via a <trial> element's /stimulusframes. You either need to set up an <openended> element or put the <textbox> on a <surveypage>.
By JK - 9/10/2014

It works! Thanks!
By atran - 2/29/2016

Hi Dave,

I am also encountering the problem of trying to randomly present 1 of 2 different text box manipulations for my study. My attempt at a fix was to write in the code below... Clearly it does not work, any suggestions on where I went wrong with my logic and how to go forward?

<surveypage page3>
/stimulusframes = [1=noreplace(page3a, page3b)]
/showquestionnumbers = false
/showpagenumbers = false
</surveypage>

<surveypage page3a>
/questions = [1=RFQ1]
/showquestionnumbers = false
/showpagenumbers = false
</surveypage>

<surveypage page3b>
/questions = [1=RFQ2]
/showquestionnumbers = false
/showpagenumbers = false
</surveypage>

<textbox RFQ1>

/caption = "Duties and Obligations......blah blah blah"
/textboxsize = (70,50)
/multiline = true
</textbox>


<textbox RFQ2>

/caption = "Hopes and Aspirations......blah blah blah"
/textboxsize = (70,50)
/multiline = true
</textbox>
By Dave - 2/29/2016

<surveypage page3>
/stimulusframes = [1=noreplace(page3a, page3b)]
/showquestionnumbers = false
/showpagenumbers = false
</surveypage>

page3a and page3b are <surveypage> elements, they are *not* stimuli. Hence you cannot display them via another <surveypage>'s or <trial>'s /stimulusframes attribute.

A <surveypage> is a kind of <trial>. Hence, the proper way to select / run them is to use a <block>'s /trials attribute or a <survey>'s /pages attribute:

<block myblock>
/ trials = [1 = noreplace(page3a, page3b)]
</block>