0 votes
in SoSci Survey (English) by s212252 (195 points)
edited by s212252

I want to display an image ("myimage.jpg") and after three seconds, my question ("TC04") appear on the screen. What's the best way for doing this? I followed this manual. I created a page in compose questionnaire section and placed an HTML element containing the following code but it doesn't work (it just shows the image, but not the question):

<img src="myimage.jpg"> 
<script type="text/javascript">
<!--
function showContent() {
  var content = document.getElementById("TC04");
  content.style.display = "";
}
 
SoSciTools.attachEvent(window, "load",
  function() {
    var content = document.getElementById("TC04");
    content.style.display = "none";
    window.setTimeout(showContent, 3000);
  }
);

// -->
</script>

What did I do wrong?

1 Answer

+1 vote
by SoSci Survey (330k points)
selected by s212252
 
Best answer

Did you put the question TC04 on the page above the JavaScript code, and did you make sure that the HTML ID is TC04 and not TC04_qst?

If you put the question on the page and it disappears (and it is visible when you do not use the additional HTML/JavaScript code), it's likely that the ID is correct. In that case, please post a pretest URL that leads directly (!) to that page.

by s212252 (195 points)
The question ID was "TC04_qst". Thanks for your help.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...