I have an XML file, and each element has a child called category. On my HTML page, I have created a dropdown form that lists the possible categories (as well as "all"). When the user selects a category from the dropdown list, it assigns a javascript variable corresponding to that category, and I then use javascript/ajax to iterate over the XML file and display a list of the elements with that category. That is all working correctly... but when it displays the list, instead of showing it under the dropdown, the dropdown goes away entirely and all you see is the list. I want to display the list BELOW the dropdown, so that the user can select a different category if he/she chooses. Please help me figure out why it's getting rid of the dropdown and how to fix it. Thanks in advance! (And also, apologies if this is a really dumb question... I'm very new to javascript.)\[code\]<html><head><script>//This is the basic XML stuff.if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.open("GET","websites.xml",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML;var x=xmlDoc.getElementsByTagName("site");//This is the part that handles printing the items under the various categories.function printCat(cat) { if(cat=="all") { for (i=0;i<x.length;i++) { document.write(x.getElementsByTagName("name")[0].childNodes[0].nodeValue + "<br/>"); } } else { for (i=0;i<x.length;i++) { if (x.getElementsByTagName("category")[0].childNodes[0].nodeValue=http://stackoverflow.com/questions/13808938/=cat) { document.write(x.getElementsByTagName("name")[0].childNodes[0].nodeValue + "<br/>"); } } } }</script></head><body> <form action='../'> <select onchange='printCat(this.options[this.selectedIndex].value)'> <option value='http://stackoverflow.com/questions/13808938/all'>All</option> <option value='http://stackoverflow.com/questions/13808938/search'>Search</option> <option value='http://stackoverflow.com/questions/13808938/social_media'>Social Media</option> </select> </form></body></html>\[/code\]