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