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