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