I am trying to retrieve a list of items from an API. Here is the code:
Qualtrics.SurveyEngine.addOnReady(function()
{
debugger;
console.log("Got here");
jQuery("#"+this.questionId+" select").select2({
debug: true,
placeholder: 'Select a program',
closeOnSelect: false,
width: '100%',
dataType: 'json',
type: 'POST',
ajax: {
url: 'https://apim-ats-all.azure-api.net/odata-api-itssmaster/odata/Training',
params: { headers: { "Ocp-Apim-Subscription-Key": "[DELETED FOR OBVIOUS REASONS]" } }
},
processResults: function (data) {
var testing = data;
console.log("Got here2");
console.log(data);
return {
results: data.items
};
},
id: function(connection){
console.log(connection);
}
});
});
The second console log command ( console.log("Got here2"); ) is never reached. The API is not receiving any calls, and I am not seeing any error messages using the. Chrome dev tools - no error messages, or any messages other than "Got here" from the first console log command ( console.log("Got here"); ) .
Is there another way to troubleshoot this that I am missing?
Select2 AJAX Debugging
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
