How To Create a Still Picture With The Questions Scrolling By | XM Community
Skip to main content
Solved

How To Create a Still Picture With The Questions Scrolling By

  • August 28, 2021
  • 4 replies
  • 287 views

Forum|alt.badge.img+5

Hello,
I would like to conduct an experiment in which there's one picture presented and a few questions following it in one page.
My idle situation would be to have the picture put in place while the questions would be presented alongside (like a split screen) and the participants could scroll up and down with the picture still in one place.
I've consulted the support team and they said I should use JAVA script in order to do so... But neither do I nor they know how to program it...
Can anyone help out with this issue?
Have a good weekend!

Daniel

Best answer by ahmedA

In

new_element.innerHTML
use single quotes to wrap the whole thing instead of double quotes.
When you paste it in the Qualtrics JS editor, everything from
'-
to
-' should of the same colour.

4 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • August 29, 2021

Forum|alt.badge.img+5
  • Author
  • Level 1 ●
  • August 31, 2021

https://community.qualtrics.com/XMcommunity/discussion/comment/40095#Comment_40095Dear Ahmed,
Thank you, I think this is a very good solution!
The problem is it doesn't work for me, have I done someting wrong with the code?

Qualtrics.SurveyEngine.addOnload(function()
{
  base_element = document.querySelector(".SkinInner")
  base_element.insertAdjacentHTML('afterbegin', '

');
  new_element = document.querySelector("#sticky_vid")
  // Change the text below to add the element of your choice
    new_element.innerHTML = "¬
https://huji.az1.qualtrics.com/CP/Graphic.php?IM=IM_6L3CtLDe5rzQfPg" style="width: 475px; height: 414px;">
¬"
   
  // This is important, otherwise, the element you add will be at the back
  base_element.style.zIndex = 1;
  new_element.style.zIndex = 10;
});

Could you help please?


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Answer
  • August 31, 2021

In

new_element.innerHTML
use single quotes to wrap the whole thing instead of double quotes.
When you paste it in the Qualtrics JS editor, everything from
'-
to
-' should of the same colour.


Forum|alt.badge.img+5
  • Author
  • Level 1 ●
  • August 31, 2021