Answer a quetsion -- 2
$10 USD
Płatność przy odbiorze
I make an ajax call to populate a select
This works:
I want to then populate the rest of the form with data that was returned from the ajax call
I tried this but the data object is undefined. How do I pass the data object into the change event
$.ajax({
url: "/_handlers/[url removed, login to view]",
data: {userRole_ID: 1300},
dataType: 'json',
type: 'POST',
contentType: 'application/x-www-form-urlencoded',
success: function (data) {
$('#ddl_users').html('<option value="0" title="Add a new client user"> Add New</option> ');
$.each(data, function (index, item) {
$('#ddl_users').append('<option value="'
+ [url removed, login to view]
+ '" title="'
+ [url removed, login to view]
+ '">'
+ [url removed, login to view]
+ '</option>');
})
$('#ddl_users').on('change',function (data) {
//alert('hi');
alert($(this).val());
$.each(data, function (index, item) {
alert([url removed, login to view]);
//if ($(this).val() == [url removed, login to view]) {
// alert('match:' + $(this).val() + ': ' + [url removed, login to view]);
//}
});
});
},
error: function (data, status, jqXHR) {
alert('There was an error loading User Data.');
}
});
Numer ID Projektu: #7436567
O projekcie
6 freelancerów złożyło ofertę za $13 w tym projekcie
hello sir, i can do your project.... please accept my bid so that i can start it... i m expert in this type of project... u can also see my portfolio... please sir accept my bid.. please hope u will do i m waiting f Więcej
Hello Sir/Mam, I have 5 years of experience in the field of web development and designing. I can assure you that your work will be done in given time and in full professional way. Awaiting your positive response Więcej
Hello Friend I have read your project very carefully and I understand what you want. thanks for good and clear explanation I have almost done many work like this. I have very good hold on HTML, PHP, MYSQL, Jquery, Więcej