Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pre() {
- $.ajax({
- url: "arquivo1.php",
- method: 'POST',
- dataType: 'json',
- success: function (data) {
- $.ajax({
- url: "arquivo2.php",
- method: 'POST',
- dataType: 'json',
- success: function (data2) {
- $.each(data.id, function(i, item) {
- $( ".lado" ).prepend("<div id='" + data.id + "'><select class='select'></select></div>");
- if (data.id == data2.id) {
- $( ".select" ).append("<option'>" + data2.id + "</option>");
- }
- });
- }
- });
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement