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