DrupalCustom

jj

Dec 13th, 2011
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function() {
  2.   $("#edit-folks-list").change(function() {
  3.     var targetLangIndex = $(this).find(":selected").text();
  4.     var chunks = targetLangIndex.split("_");
  5.     var idChunk = chunks[1];
  6.    
  7.       $.getJSON('/drupalTheme/translate/webDelegate.php?name='+idChunk, function(data) {
  8.           $.each(data, function(key, value) {  
  9.          $('#edit-targetLang-list').remove().append($('<option>', { key : value }).text(value));});
  10.        
  11.       $.each(data, function(key, value) {  
  12.          $('#edit-targetLang-list').append($('<option>', { key : value }).text(value));});
  13.     });
  14.   });
  15. });
  16.  
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment