hi all
i have two dynamic drop downs of dealer id and category id which work properly with window.location
var dealerid;
function getList(xyz)
{
window.location='manage_products.php?category_id=' + xyz;
}
function getProducts(dealer_id)
{
var catid=document.form1.category.value;
window.location='manage_products.php?dealer_id=' + dealer_id + "&category_id="+catid ;
}
but now i want to add static drop down of sub category and make use of window.location which i m not able to do
<select name="sub_catg" onchange="getSb(this.value)" id="sub_catg">
<option>Select Sub Category</option>
<option value="Batteries">Batteries</option>
<option value="Leather & PU Cases">Leather & PU Cases</option>
<option value="Crystal & Rubber Coated Cases">Crystal & Rubber Coated Cases</option>
<option value="Car Mounts & USB Cradles">Car Mounts & USB Cradles</option>
<option value="AC Chargers & Car Chargers">AC Chargers & Car Chargers</option>
</select>
This is function that is not working
<script language="javascript">
var subid=document.form1.sub_catg.value;
function getSb(subid)
{
window.location='manage_products.php?dealer_id=' + dealer_id + "&category_id="+catid + "&sub_catg=" + subid ;
}
</script>
vineet