jQuery(function(){ //jQuery("#areaIndex_3148991").val(-1); //jQuery(".hotelContent select").fancyfields(); jQuery("#areaIndex_3148991").fancyfields("bind","onSelectChange",function(){ jQuery(".ffSelectButton SPAN",jQuery("#supplier_3148991").closest(".ffSelectWrapper")).text("אנא המתן..."); jQuery.post("/loadHotelSearch.do",{"areaIndex": jQuery("#areaIndex_3148991").val()}, function(data){ jQuery('#supplier_3148991').empty(); jQuery('#supplier_3148991').append(data); jQuery("#supplier_3148991").insertAfter(jQuery("#supplier_3148991").closest(".ffSelectWrapper")); jQuery("#supplier_3148991").prev(".ffSelectWrapper").remove(); var curSetting = jQuery("#supplier_3148991").data('settings'); jQuery("#supplier_3148991").show().fancyfields(curSetting); //alert(data); }) }); selectSetVal(jQuery("#areaIndex_3148991"),-1); jQuery("#supplier_3148991").fancyfields("bind","onSelectChange",function(){ jQuery(".ffSelectButton SPAN",jQuery("#ratingHotel_3148991").closest(".ffSelectWrapper")).text("אנא המתן..."); jQuery(".ffSelectButton SPAN",jQuery("#compositionRoom_3148991").closest(".ffSelectWrapper")).text("אנא המתן..."); jQuery.post("/loadHotelBase.do",{"supplierIndex": jQuery("#supplier_3148991").val()}, function(data){ var loadArr = data.split("zzz"); jQuery("#ratingHotel_3148991").empty(); jQuery("#compositionRoom_3148991").empty(); jQuery("#ratingHotel_3148991").append(loadArr[0]); jQuery("#compositionRoom_3148991").append(loadArr[1]); jQuery("#compositionRoom_3148991 option[value='2']").attr('selected', 'selected'); jQuery("#ratingHotel_3148991").insertAfter(jQuery("#ratingHotel_3148991").closest(".ffSelectWrapper")); jQuery("#ratingHotel_3148991").prev(".ffSelectWrapper").remove(); var curSetting = jQuery("#ratingHotel_3148991").data('settings'); jQuery("#ratingHotel_3148991").show().fancyfields(curSetting); jQuery("#compositionRoom_3148991").insertAfter(jQuery("#compositionRoom_3148991").closest(".ffSelectWrapper")); jQuery("#compositionRoom_3148991").prev(".ffSelectWrapper").remove(); curSetting = jQuery("#compositionRoom_3148991").data('settings'); jQuery("#compositionRoom_3148991").show().fancyfields(curSetting); }); }); });