how could I display a popup window when respondents click on text | XM Community
Skip to main content


Hi,
I am new to Qualtrics. I like to display a popup window when respondents click on certain text on the survey. It is like a definition or more information need to show to respondents on certain terms or text on the survey. I use the javascript function like that below:

function open_new_window1a(event) {
 event = event || window.event;
 if (event.preventDefault) {
  event.preventDefault();
 } else {
 event.returnValue = false;
}

  

new_window = open("","my_new_window","width=360,height=420,left=45,top=150, scrollbars=1");
new_window.focus();
new_window.document.open();
new_window.document.write("");
new_window.document.write("The Lifetime Capital Gains Exemption (LCGE) helps to spare businesses from paying taxes on all or part of the profit they earn when selling a small business, a farm property or a fishing property. Business owners may seek to use this option when selling their business as source of income for retirement. ");
new_window.document.write("
");
new_window.document.write("
");
new_window.document.write("");
new_window.document.close();
}
on the text for click, I use the code like that:
LCGE
but Qualtrics could not use document.write and said it is invalid javascript syntax. Do anyone have a code that could share what I need to accomplish this task?
Thanks,

yinche
Why don't you use tooltip ?
You can do this easily by looking at this page How To Create Tooltips (w3schools.com)
Hope it helps!


Leave a Reply