Your code is not redirecting anything to google.com
The following html is being generated for one of the Cities dropdownlist.
As you can see the value is the google.com address, when it gets selected it will not goto the value in the option.
<select name="subcategory2">
<option value="">Select Sub-Category2</option>
<option value="http://google.com/">Chennai</option>
<option value="http://google.com/">Madurai</option>
<option value="http://google.com/">Trichi</option>
</select>
You could do something like this to get your code to go to the url in the value option:
<script type="text/javascript" language="javascript">
<!--
document.write('<select name="subcategory2" onChange="javascript: goto(this.options[this.selectedIndex].value);"><option value="">Select Sub-Category 2</option></select>')
-->
</script>
Make note the document.write is not required, ordinary markup will do:
<select name="subcategory1" onChange="javascript: listboxchange(this.options[this.selectedIndex].value);">
<option value="">Select Sub-Category 1</option>
</select>
<select name="subcategory2" onChange="javascript:goto(this.options[this.selectedIndex].value);">
<option value="">Select Sub-Category 2</option>
</select>
function goto(url){
location.href=url;
}
http://www.w3schools.com/jsref/prop_loc_href.asp[
^]