Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. // Get xml data & append to selectbox
  2. $.ajax({
  3. type: "GET",
  4. url: "test.xml",
  5. dataType: "xml",
  6. success: function(xml){
  7. $(xml).find('ReportOptions').each(function() {
  8. var cNum = $(this).find('cusipnum').text(); // assign vars to incoming data
  9. $('#cusip').append('<option>'+cNum+'</option>'); // append data to options
  10. });
  11. $('#cusip').multiselect('refresh');
  12. },
  13. error: function (xhr, ajaxOptions, thrownError) {
  14. alert("Error Status:"+xhr.status+", "+thrownError);
  15. }
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement