function City(level) { if (level == '1') { $('#cat2div').html(''); } var cat = $("#sehir"+level).val(); $.ajax({ type: "GET", data: "cat=" + cat + '&level=' + level+'&class=', url: "http://emlakkur.com.tr/com/common/js/selectCityF.php", success: function(msg){ $("#sehir"+level+"div1").html(msg).show(); } }); }