Java - record time on button click (embedded data I guess?) | XM Community
Question

Java - record time on button click (embedded data I guess?)

  • 16 September 2019
  • 0 replies
  • 12 views

Userlevel 1
Hi all,

I want to collect data when people click on "btn1" (see the javascript below). Could anyone help?! I specifically need to collect the data when people click on this button to close this popup window so that when I download data, it shows when people closed this window. Below is the code I have. Thank you SO MUCH in advance!!



Qualtrics.SurveyEngine.addOnReady(function()
{

jQuery("[id*='dialog']" ).dialog({ autoOpen: false});


jQuery( "#btn1" ).click(function() {
jQuery("#dialog").dialog( "option", "modal", true );
jQuery("#dialog").dialog( "close" );

});


var delayTime = 3000; //This is the time of delay
setTimeout(function(){jQuery("[id*='dialog']" ).dialog({ autoOpen: true, draggable:true, scroll:false, height:'auto', width:'750x',
open: function(event,ui){

$(event.target).parent().css('position', 'fixed');
$(event.target).parent().css('top', '5px');
$(event.target).parent().css('left', '100px');
}
})}, delayTime);


});

0 replies

Be the first to reply!

Leave a Reply