Javascript-форум (https://javascript.ru/forum/)
-   Элементы интерфейса (https://javascript.ru/forum/dom-window/)
-   -   Оформить скрипт (https://javascript.ru/forum/dom-window/62171-oformit-skript.html)

Alex_63 30.03.2016 18:04

ureech,
(function(){
  var cache ={};
  $('select[name="mark"]').change(function() {
         var data0 = this.name + '=' + this.selectedIndex.value;
         if(cache[data0]){
             $('#brn').html(cache[data0]);
         } else {
           $.ajax({
              type:"POST",
              url:"/modules/mod_search_auto/ajax.php",
              dataType:"html",
              data: data0,
              success: function(response) {
                 $('#brn').html(response);
                 cache[data0] = response;
                 // alert(cache[data0])
              }
           });
         }		 
  });
})();

ureech 30.03.2016 19:55

Alex_63,
Спасибо, за желание помочь, но твой вариант не работает, у меня по крайней мере.:)


Часовой пояс GMT +3, время: 00:55.