Advertisement
ihris

Untitled

Mar 16th, 2011
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function changeInputs() {
  2.     var id = this.getID();
  3.     var selected = this.getSelected().get('value');
  4.     if (!id || !value) {
  5.         //no id. or no value so quit                                                                                                                                                                                                                                  
  6.         return;
  7.     }
  8.     $$('tr.input_' + id).each(function(input){
  9.         if (input.hasClass ('input_' + id  + '_'+ selected )){
  10.             input.setStyle ('visibility','visible');
  11.         }  else {
  12.             input.setStyle ('visibility','hidden');
  13.         }
  14.     });
  15. }
  16.  
  17. var e =  $('building_costing_mechanism');
  18. if (e) {
  19.     e.addEvent('change',changeInputs.bind(e));
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement