Populate Select Options Folder with xml files

someguy1

New Member
This is my HTML code for the select ID:\[code\]<select class="dropdown-toggle" id="combo"></select>\[/code\]I have this HTML file and I need to populate the options with XML files that I have on a root folder named xml. I have JQuery imported in the header. I have tried lots of examples but I can not get it to work. The XML files are in /XML folder.Thanks in advance!\[code\]<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript"> $(function(){ $.ajax({ url: '/xml', success: function(d){ $.each(d.split(/[\r\n]+/),function(i,e){ $('<option>',{ value: e }).text(e),'</option>'.appendTo('#combo'); }); } });</script>\[/code\]I tried this code but it is not working...
 
Back
Top