Created
July 5, 2020 09:06
-
-
Save moshfeu/b934f5b2deec73e7fe7c56ae9eb0ad4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const select = $("#pipe_name" + j) | |
.select2({ | |
placeholder: '-- Choose Pipe Name --', | |
theme: "bootstrap", | |
width: '100%' | |
}) | |
.html(''); | |
.append('<option value="">-- Choose Pipe Name --</option>'); | |
$.ajax({ | |
url: url, | |
type: 'GET', | |
dataType: 'json', | |
success: function(result) { | |
for (i = 0; i < result.length; i++) { | |
select.append('<option value="' + result[i].code + '">' + result[i].code + '|' + result[i].name + '|' + result[i].unit + '</option>'); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment