Advertisement
DrupalCustom

analysscode

Feb 3rd, 2012
201
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.             $("#edit-custRef").val(new_cfgs);
  9.           });
  10.          
  11.           $("#edit-analysis-code-two").change(function () {
  12.             // Get the configs and split them.
  13.             var cfgs = _get_configs("edit-custRef");
  14.             var split_cfgs = cfgs.split('/');
  15.            
  16.             // Create some new configs and put it back into the configs textfield.
  17.             var new_cfgs = cfgs[0] +"/"+ $(this).val();
  18.             $("#edit-custRef").val(new_cfgs);
  19.          });
  20.        
  21.    
  22.     });
  23.  
  24. function _get_configs(id) {
  25.   return $("#"+ id).val();
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement