I should have put my full code up just so there could be more background as to what was going on, my mistake. I was however able to fix the code by making your first suggested change which was to
get rid of the native action "a=q" in my getScript url, and i am now able to see the qdb_data! Thank you for your help and i will start working on trying to parameterize the code to clear it up like you said.
var data = "<qdbapi>\r\n <username></username>\r\n <password></password>\r\n <apptoken>"my apptoken here"</apptoken>\r\n <clist>3.252</clist> <jsa>1</jsa> \r\n </qdbapi>";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
$.getScript("bk63yxbf9?qid=140&act=API_GenResultsTable&jsa=1",function(){ // removed "a=q"
console.log("Hello World");
console.log("qdb_data Test");
console.log(qdb_data);
});
}
});
xhr.open("POST", "
https://website.quickbase.com/db/bk63yxbf9?a=q&qid=140");
xhr.setRequestHeader("Content-Type", "text/xml");
xhr.setRequestHeader("QUICKBASE-ACTION", "API_GenResultsTable");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.setRequestHeader("Postman-Token", "91d79d23-22d3-45c8-85c3-0e1d0870969c"); //postman token
xhr.send(data);
The DBID that i was using is in fact the DBID for the table, i checked this by going into the app settings ----> app management ---> app statistics, and choosing the ID that was listed for the table i was using.
thank you again!