title: Qualtrics: Custom JavaScript ceases to work when importing questions to a new survey
body: <p>I have a <a href="https://dl.dropboxusercontent.com/u/66464491/MLI_Sliders.qsf" rel="nofollow noreferrer">Qualtrics survey</a> containing a few questions with custom JavaScript (to enable a slider with two slider knobs). I can a) copy the survey as well as b) export the survey as a .qsf file and re-import it. In both cases, I get a new, working survey. </p>
  
  <p>However, importing the survey questions to an existing survey using the "Import Questions From..." function does not work; the JavaScript fails to work in this case. Is there a way to import these questions to an existing survey while preserving the JavaScript?</p>
  
  <p>The code used in the first (most relevant) question:</p>
  
  <pre><code>Qualtrics.SurveyEngine.addOnload(function()
  {
  
      document.getElementById("QR~QID7").setAttribute("readonly", "readonly");
      document.getElementById("QR~QID8").setAttribute("readonly", "readonly");
      var surface;
      var cnst = 4;
      // Sets the sliders parameters and starting values
       $("#research-slider").slider({ id: "research-slider", min: 0, max: 10, range: true, value: [0, 10]});
       // variable to store in surface area when user has stopped sliding
       var surface, currentResponse;
       $("#research-slider").on("slideStop", function(slideEvt) {
           surface = slideEvt.value;
           document.getElementById("minimum").innerHTML  = surface[0];
           document.getElementById("maximum").innerHTML  = surface[1];
           document.getElementById("newValue").innerHTML  = (surface[1]- surface[0])/cnst ;
           document.getElementById("QR~QID7").value  = surface[0];
           document.getElementById("QR~QID8").value  = surface[1];
       });
  
  
  
       $('NextButton').onclick = function (event) {       
          // and now run the event that the normal next button is supposed to do
          Qualtrics.SurveyEngine.navClick(event, 'NextButton')
      }
  
  })
  </code></pre>