Advertisement
DrupalCustom

newjss

Feb 3rd, 2012
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       $("#edit-analysis-code-one").change(function () {
  2.             // Get the configs and split them.
  3.             var cfgs = _get_configs("edit-custRef");
  4.             var split_cfgs = cfgs.split('/');
  5.            
  6.             // Create some new configs and put it back into the configs textfield.
  7.             //var new_cfgs = $(this).val() +"/"+ cfgs[1];
  8.             var new_cfgs = $("#edit-analysis-code-one option:selected").text() +"/"+ cfgs[1];
  9.            
  10.             $("#edit-custRef").val(new_cfgs);
  11.           });
  12.          
  13.           $("#edit-analysis-code-two").change(function () {
  14.             // Get the configs and split them.
  15.             var cfgs = _get_configs("edit-custRef");
  16.             var split_cfgs = cfgs.split('/');
  17.            
  18.             // Create some new configs and put it back into the configs textfield.
  19.             //var new_cfgs = cfgs[0] +"/"+ $(this).val();
  20.             var new_cfgs = cfgs[0] +"/"+ $("#edit-analysis-code-two option:selected").text()
  21.             $("#edit-custRef").val(new_cfgs);
  22.          });
  23.        
  24.    
  25.     });
  26.  
  27. function _get_configs(id) {
  28.  
  29.   return $("#"+ id).val();
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement