How to obtain value from single line text box using javascript? | XM Community
Solved

How to obtain value from single line text box using javascript?

  • 7 August 2019
  • 1 reply
  • 204 views

Hi thanks for helping me out.
I am trying to obtain the value from a single line text box using this.getTextValue().
What am I doing wrong?

Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
this.questionclick = function(event,element){
//alert('ID: ' +element.id);

var answer = this.getTextValue()
alert(answer);
}
});
icon

Best answer by als100027 7 August 2019, 20:38

View original

1 reply

I solved it this way:
this.questionclick = function(event,element){
alert('ID: ' +element.value);

Leave a Reply