I have a function that detects any changes in the user's window and when a certain width/height is reached, I want to alert the user and disable the next button.What I am trying to achieve is something along the lines of:if (condition == True) {disableNextButton()} else {enableNextButton()}This needs to go in the Header, under Look & Feel as this is a function that will apply on all pages of my survey.This sort of code work perfectly when I put it in individual questions as I can use the this object as follows:if (condition == True) {this.disableNextButton()} else {this.enableNextButton()}However, I can't seem to find an alternative for applying that in the Header and workarounds seem quite cumbersome.Any ideas?
Currently I have a question formatted like a certificate and a button which allows the participant to print that certificate to pdf: Survey link here I would like to know if there is a way where I can automatically press the button the fly (even without the participant doing that) and instead of asking the user to save it, I would like to upload it to the Qualtrics library (or anywhere really) so I can have it for future use. Is this possible? My use code below (relevant scripts are already imported in the look and feel's header and the button has an id of "mybutton2"). This is my JS code (in the AddOnLoad function of course): function getPDF() { domtoimage.toPng( document.querySelector(".canvas_div_pdf"), { width: 760, height: 960, quality: 1} ) .then(function(dataUrl) { var doc = new jsPDF(); var img = new Image(); img.src = dataUrl; img.onload = function() { doc.addImage(img, 'PNG', 10, 15); doc.save('filename.pdf'); }; }) .catch(function (error) { c
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.