Advertisement
DrupalCustom

JSFile

Dec 12th, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function populateTargetlangs() {
  2.   $("#edit-folks-list").change(function() {
  3.     var targetLangIndex = $(this).find(":selected").text();
  4.     var chunks = targetLangIndex.split("_");
  5.     var idChunk = chunks[1];    
  6.     alert("hello worlds "+ idChunk);
  7.     $.post('webDelegate.php',{name:idChunk},
  8.         function (output){
  9.         $("#edit-targetLang-list").html(output).show();
  10.         });
  11.   });
  12. });
  13.  
  14.  
  15. /*$(document).ready(function populateTargetlangs() {
  16.   $("#edit-folks-list").change(function() {
  17.     var targetLangIndex = $(this).find(":selected").text();
  18.     var chunks = targetLangIndex.split("_");
  19.     var idChunk = chunks[1];
  20.    
  21.     $.getJSON('webDelegate.php?name='+ idChunk, function (output){
  22.       $("#edit-targetLang-list").html(output).show();
  23.     });
  24.   });
  25. });
  26. */
  27.  
  28. /*$(document).ready(function populateTargetlangs() {
  29.   $("#edit-folks-list").change(function() {
  30.     var targetLangIndex = $(this).find(":selected").text();
  31.     var chunks = targetLangIndex.split("_");
  32.     var idChunk = chunks[1];
  33.    
  34.     $.getJSON('webDelegate.php?name='+ idChunk, function (output){
  35.       $.each(output, function(key, value) {  
  36.          $('#edit-targetLang-list').append($('<option>', { value : key }).text(value));});
  37.     });
  38.   });
  39. });
  40. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement