Jump to content
xisto Community

Sydney626

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by Sydney626

  1. Hello Galexcd, if you can think of an easier way to create those 3 level drop down box, very interested to hear from you
  2. Hello thereI have used the below code to create a double drop down box1st one show Country2nd one shows Airport3rd one shows City I am not sure what to add to this code to add the third choice drop down box.Can someone help ? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/ http-equiv="Content-Type" content="text/html; charset=utf-8" /><script language="javascript" type="text/javascript">function dropdownlist(listindex){document.formname.subcategory.options.length = 0;switch (listindex){case "Spain" :document.formname.subcategory.options[0]=new Option("Select Airport","");document.formname.subcategory.options[1]=new Option("Barcelona","Barcelona");document.formname.subcategory.options[2]=new Option("Gerona","Gerona");document.formname.subcategory.options[3]=new Option("Malaga","Malaga");document.formname.subcategory.options[4]=new Option("Alicante","Alicante");document.formname.subcategory.options[5]=new Option("Madrid","Madrid");break;case "Greece" :document.formname.subcategory.options[0]=new Option("Select Airport","");document.formname.subcategory.options[1]=new Option("Rhodes","Rhodes");document.formname.subcategory.options[2]=new Option("Athens","Athens");document.formname.subcategory.options[3]=new Option("Heraklion","Heraklion");document.formname.subcategory.options[4]=new Option("Corfu","Corfu");document.formname.subcategory.options[5]=new Option("Zante","Zante");break;case "Turkey" :document.formname.subcategory.options[0]=new Option("Select Airport","");document.formname.subcategory.options[1]=new Option("Antalya","Antalya");document.formname.subcategory.options[2]=new Option("Bodrum","Bodrum");document.formname.subcategory.options[3]=new Option("Dalaman","Dalaman");document.formname.subcategory.options[4]=new Option("Istambul","Istambul");break;}return true;}</script></head><title>Dynamic Drop Down List</title><body><form id="formname" name="formname" method="post" action="submitform.asp" ><table width="50%" border="0" cellspacing="0" cellpadding="5"><tr><td width="41%" align="right" valign="middle">Country :</td><td width="59%" align="left" valign="middle"><select name="category" id="category" onchange="javascript: dropdownlist(this.options[this.selectedIndex].value);"><option value="">Select Country</option><option value="Spain">Spain</option><option value="Turkey">Turkey><option value="Greece">Greece</option></select></td></tr><tr><td align="right" valign="middle">Airport :</td><td align="left" valign="middle"><script type="text/javascript" language="JavaScript">document.write('<select name="subcategory"><option value="">Select Airport</option></select>')</script><noscript><select name="subcategory" id="subcategory" ><option value="">Select Sub-Category</option></select></noscript></td></tr></table></form> </body></html> </body></html>
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.