javascript - Qualtrics: Empty button appended by jquery refreshes page -


i'm attempting implement experiment in qualtrics, i've run against wall.

a button appended qualtrics question using jquery refresh page, regardless of whether or not .click or .event have been defined. in design has effect of wiping responses participant has given until point, last thing want happen.

my code complicated (a.k.a. poorly written) post here. can replicate error creating new survey consisting of single 'descriptive text' question , attaching code. here jq refers jquery

qualtrics.surveyengine.addonload(function(){     /*place javascript below line*/     jq('.questionbody').append('<button>this shouldn\'t anything</button>')  }); 

this link example of above.

https://sydneypsy.qualtrics.com/se/?sid=sv_1zgmxfent0ykxbr

why happen? know prevent it?

source: robbrit

this default behaviour of button. if want change it, this:

$("button selector").click( function(event) {   event.preventdefault(); }); 

in case, give button id use selector.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -