/[openfoncier]/branches/3.2.x/app/js/script.js
ViewVC logotype

Diff of /branches/3.2.x/app/js/script.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 614 by nhaye, Tue Nov 6 16:55:38 2012 UTC revision 626 by vpihour, Wed Nov 7 16:54:25 2012 UTC
# Line 180  function popupIt(objsf, link) { Line 180  function popupIt(objsf, link) {
180  function changeQuartier(){  function changeQuartier(){
181            
182      var idArrondissement = $("#arrondissement option:selected").val();      var idArrondissement = $("#arrondissement option:selected").val();
183      if ( idArrondissement != '' && $.isNumeric(idArrondissement) ){      link = "../app/listeQuartier.php?idx=" + idArrondissement;
184                $.ajax({
185          link = "../app/listeQuartier.php?idx=" + idArrondissement;          type: "GET",
186          $.ajax({          url: link,
187              type: "GET",          cache: false,
188              url: link,          success: function(html){
189              cache: false,              if ( html !== '' ){
190              success: function(html){                  
191                  if ( html !== '' ){                  $('#quartier').empty();
192                    $('#quartier').append(
193                        '<option value="" selected="selected">*</option>'
194                    );
195                    
196                    html = html.split(';');
197                    for ( i = 0 ; i < html.length - 1 ; i++ ){
198                                            
199                      $('#quartier').empty();                      html_temp = html[i].split('_');
200                      $('#quartier').append(                      $('#quartier').append(
201                          '<option value="" selected="selected">*</option>'                          '<option value="'+html_temp[0]+'" >'+html_temp[1]+'</option>'
202                      );                      );
                       
                     html = html.split(';');  
                     for ( i = 0 ; i < html.length - 1 ; i++ ){  
                           
                         html_temp = html[i].split('_');  
                         $('#quartier').append(  
                             '<option value="'+html_temp[0]+'" >'+html_temp[1]+'</option>'  
                         );  
                     }  
203                  }                  }
204              },              }
205              async: false          },
206          });          async: false
207      }      });
208  }  }

Legend:
Removed from v.614  
changed lines
  Added in v.626

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26