Solved! Go to Solution.
function callquery1(params) { queryTask = new esri.tasks.QueryTask(queryurl); query = new esri.tasks.Query(); query.returnGeometry = true; query.outFields = ["*"]; query.where = "id = '" + params+ "'"; //either queryTask.execute(query,function(results){ here create your second query }); //or queryTask.execute(query,callquery2); } function callquery2(results) { //with the results you bild you second params console.log(results); //write the results to the console check firebug or dom inspektor queryTask = new esri.tasks.QueryTask(queryurl); query = new esri.tasks.Query(); query.returnGeometry = true; query.outFields = ["*"]; query.where = "id = '" + params+ "'"; //either queryTask.execute(query,function(results){ here create your thirdquery }); //or queryTask.execute(query,callquery3); }
function callquery1(params) { queryTask = new esri.tasks.QueryTask(queryurl); query = new esri.tasks.Query(); query.returnGeometry = true; query.outFields = ["*"]; query.where = "id = '" + params+ "'"; //either queryTask.execute(query,function(results){ here create your second query }); //or queryTask.execute(query,callquery2); } function callquery2(results) { //with the results you bild you second params console.log(results); //write the results to the console check firebug or dom inspektor queryTask = new esri.tasks.QueryTask(queryurl); query = new esri.tasks.Query(); query.returnGeometry = true; query.outFields = ["*"]; query.where = "id = '" + params+ "'"; //either queryTask.execute(query,function(results){ here create your thirdquery }); //or queryTask.execute(query,callquery3); }