Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Not sure if you're looking to actually POST to the form; if not, you can use your Option structure to store your target paths, create a function to navigate to urls, and call from the onChange event of your second dropdown ie:</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; function dropdownlist(listindex) { document.formname.subcategory.options.length = 0; switch (listindex) { case "Home Ware" : document.formname.subcategory.options[0]=new Option("Select Sub-Category",""); document.formname.subcategory.options[1]=new Option("Air-Conditioners/Coolers", "www.google.com"); document.formname.subcategory.options[2]=new Option("Audio/Video", "www.yahoo.com"); document.formname.subcategory.options[3]=new Option("Beddings", "www.ikea.com"); document.formname.subcategory.options[4]=new Option("Camera", "www.apple.com"); document.formname.subcategory.options[5]=new Option("Cell Phones", "www.sprint.com"); break; case "Education" : document.formname.subcategory.options[0]=new Option("Select Sub-Category",""); document.formname.subcategory.options[1]=new Option("Colleges", "www.aol.com"); document.formname.subcategory.options[2]=new Option("Institutes", "www.facebook.com"); document.formname.subcategory.options[3]=new Option("Schools", "www.pintrest.com"); document.formname.subcategory.options[4]=new Option("Tuitions", "www.lottopick.in"); document.formname.subcategory.options[5]=new Option("Universities", "www.cnn.com"); break; case "Books" : document.formname.subcategory.options[0]=new Option("Select Sub-Category",""); document.formname.subcategory.options[1]=new Option("College Books","www.oracle.com"); document.formname.subcategory.options[2]=new Option("Engineering","stackoverflow.com"); document.formname.subcategory.options[3]=new Option("Magazines","monster.com"); document.formname.subcategory.options[4]=new Option("Medicine","www.twitter.com"); document.formname.subcategory.options[5]=new Option("References","www.yelp.com"); break; } return true; } function navigate(target){ window.location.href = 'http://' + target; } &lt;/script&gt; </code></pre> <p>Also:</p> <pre><code> &lt;tr&gt; &lt;td align="right" valign="middle"&gt;Sub Category : &lt;/td&gt; &lt;td align="left" valign="middle"&gt; &lt;select name="subcategory" onchange="javascript:navigate(this.options[this.selectedIndex].value);"&gt; &lt;option value=""&gt;Select Sub-Category&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload