I have a small script, where on change I am getting the ID of a select, I then want to take that ID and send it via "data:" through the jQuery AJAX call. I am using XML for my data and I am sending this ID for it only returns results with that specific ID?
I understand how to do this with PHP, but never worked with XML and jQuery before.
Thoughts?
Thanks,
Ryan
UPDATE:
Here is a piece of my code, sorry I didnt post it before.
function populateDropDown(){
console.log("populateDropDown is called");
$(".user-selection").show();
$.ajax({
type: "GET",
url: "employee.xml",
dataType: "xml",
data: "access_info.level"+ type_id,
success: function(xml) {
console.log("success!");
var select = $('#select-user');
$(xml).find('employee').each(function(){
var fn = $(this).find('first_name').text();
var ln = $(this).find('last_name').text();
//var value = $(this).find('access_level').text();
select.append("<option class='ddindent' value='"+ fn +"'>"+fn +" "+ ln +"</option>");
});
select.children(":first").text("Please make a selection").attr("selected",true);
}
});
console.log("from popdrop"+type_id)
}
That is an exmaple, I need to send a parameter to only return X results, in this case its an ID that I grabbed from the drop-down.