/* * onload */ $(function(){ $("select#category_id").change(function() { if ($(this).val() > 0 || $(this).val() == "0" ) { url = "./index.php?category_id=" + $(this).val(); } else { url = "./index.php"; } window.location.replace(url); }); });